Package io.smallrye.jwt.config
Class JWTAuthContextInfoProvider
- java.lang.Object
-
- io.smallrye.jwt.config.JWTAuthContextInfoProvider
-
@Dependent public class JWTAuthContextInfoProvider extends Object
A CDI provider for the JWTAuthContextInfo that obtains the necessary information from MP config properties.
-
-
Constructor Summary
Constructors Constructor Description JWTAuthContextInfoProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static JWTAuthContextInfoProvidercreateWithCertificate(String keyLocation, String issuer)Create JWTAuthContextInfoProvider with the verification public key location and issuer.static JWTAuthContextInfoProvidercreateWithDecryptionKey(String decryptionKey, String issuer)Create JWTAuthContextInfoProvider with the decryption key and issuerstatic JWTAuthContextInfoProvidercreateWithKey(String publicKey, String issuer)Create JWTAuthContextInfoProvider with the public key and issuerstatic JWTAuthContextInfoProvidercreateWithKeyLocation(String keyLocation, String issuer)Create JWTAuthContextInfoProvider with the verification public key location and issuerstatic JWTAuthContextInfoProvidercreateWithKeyStoreLocation(String keyLocation, Optional<String> theKeyStorePassword, Optional<String> theKeyStoreVerifyKeyAlias, Optional<String> theKeyStoreDecryptKeyAlias, String issuer)Create JWTAuthContextInfoProvider with the keystore and issuerstatic JWTAuthContextInfoProvidercreateWithSecretKeyLocation(String keyLocation, String issuer)Create JWTAuthContextInfoProvider with the verification secret key location and issuerstatic JWTAuthContextInfoProvidercreateWithVerifyKeyStoreLocation(String keyLocation, Optional<String> theKeyStorePassword, Optional<String> theKeyStoreVerifyKeyAlias, Optional<String> theKeyStoreDecryptKeyAlias, String issuer)Create JWTAuthContextInfoProvider with the keystore and issuerJWTAuthContextInfogetContextInfo()
-
-
-
Method Detail
-
createWithKey
public static JWTAuthContextInfoProvider createWithKey(String publicKey, String issuer)
Create JWTAuthContextInfoProvider with the public key and issuer- Parameters:
publicKey- the public key valueissuer- the issuer- Returns:
- a new instance of JWTAuthContextInfoProvider
-
createWithDecryptionKey
public static JWTAuthContextInfoProvider createWithDecryptionKey(String decryptionKey, String issuer)
Create JWTAuthContextInfoProvider with the decryption key and issuer- Parameters:
decryptionKey- the decryption key valueissuer- the issuer- Returns:
- a new instance of JWTAuthContextInfoProvider
-
createWithKeyLocation
public static JWTAuthContextInfoProvider createWithKeyLocation(String keyLocation, String issuer)
Create JWTAuthContextInfoProvider with the verification public key location and issuer- Parameters:
keyLocation- the verification public key locationissuer- the issuer- Returns:
- a new instance of JWTAuthContextInfoProvider
-
createWithCertificate
public static JWTAuthContextInfoProvider createWithCertificate(String keyLocation, String issuer)
Create JWTAuthContextInfoProvider with the verification public key location and issuer. Tokens will be expected to contain either 'x5t' or 'x5t#S256' thumbprints.- Parameters:
keyLocation- certificate location which points to a PEM certificate or JWK containing the certificate chainissuer- the issuer- Returns:
- a new instance of JWTAuthContextInfoProvider
-
createWithSecretKeyLocation
public static JWTAuthContextInfoProvider createWithSecretKeyLocation(String keyLocation, String issuer)
Create JWTAuthContextInfoProvider with the verification secret key location and issuer- Parameters:
keyLocation- the verification secret key locationissuer- the issuer- Returns:
- a new instance of JWTAuthContextInfoProvider
-
createWithVerifyKeyStoreLocation
public static JWTAuthContextInfoProvider createWithVerifyKeyStoreLocation(String keyLocation, Optional<String> theKeyStorePassword, Optional<String> theKeyStoreVerifyKeyAlias, Optional<String> theKeyStoreDecryptKeyAlias, String issuer)
Create JWTAuthContextInfoProvider with the keystore and issuer
-
createWithKeyStoreLocation
public static JWTAuthContextInfoProvider createWithKeyStoreLocation(String keyLocation, Optional<String> theKeyStorePassword, Optional<String> theKeyStoreVerifyKeyAlias, Optional<String> theKeyStoreDecryptKeyAlias, String issuer)
Create JWTAuthContextInfoProvider with the keystore and issuer
-
getContextInfo
@Produces @ApplicationScoped public JWTAuthContextInfo getContextInfo()
-
-