Class OAuth2ResourceSecurityProperties
java.lang.Object
com.broadleafcommerce.oauth2.resource.security.environment.OAuth2ResourceSecurityProperties
@ConfigurationProperties(prefix="broadleaf.resource.security.oauth2")
public class OAuth2ResourceSecurityProperties
extends Object
- Author:
- Nick Crum (ncrum)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
boolean
jakarta.servlet.DispatcherType[]
The dispatcher type matchers to permit without authorization.The encoded RSA public key used for verifying the signature of access tokens.The URI to JwkSetEndpointString[]
The set of ant path matchers on which resource security should apply.Getter for the RSA public key.Validation for the aud claim from the received JWT token.Validation for the iss claim from the received JWT tokenint
hashCode()
boolean
Whether dispatcher authorization should be configured.boolean
Whether or not to allow anonymous access.void
setConfigureDispatcherTypeAuthorization
(boolean configureDispatcherTypeAuthorization) Whether dispatcher authorization should be configured.void
setDefaultAllowAllAnonymous
(boolean defaultAllowAllAnonymous) Whether or not to allow anonymous access.void
setDispatcherTypeMatchersPermittedWithoutAuthorization
(jakarta.servlet.DispatcherType[] dispatcherTypeMatchersPermittedWithoutAuthorization) The dispatcher type matchers to permit without authorization.void
setEncodedPublicKey
(String encodedPublicKey) The encoded RSA public key used for verifying the signature of access tokens.void
setJwkSetUri
(String jwkSetUri) The URI to JwkSetEndpointvoid
setMatchers
(String[] matchers) The set of ant path matchers on which resource security should apply.void
setValidAudiences
(List<String> validAudiences) Validation for the aud claim from the received JWT token.void
setValidIssuers
(List<String> validIssuers) Validation for the iss claim from the received JWT tokentoString()
-
Constructor Details
-
OAuth2ResourceSecurityProperties
public OAuth2ResourceSecurityProperties()
-
-
Method Details
-
getRsaPublicKey
Getter for the RSA public key. Decodes the encoded public key and creates anRSAPublicKey
.- Returns:
- the rsa public key
- Throws:
NoSuchAlgorithmException
- when no algorithm existsInvalidKeySpecException
- when invalid key specification
-
getValidIssuers
Validation for the iss claim from the received JWT token -
getValidAudiences
Validation for the aud claim from the received JWT token. Usually this also contains all of the valid issuers from the iss claim -
getEncodedPublicKey
The encoded RSA public key used for verifying the signature of access tokens. -
getJwkSetUri
The URI to JwkSetEndpoint -
getMatchers
The set of ant path matchers on which resource security should apply. Defaults to "/**", which applies resource security on all paths. -
isDefaultAllowAllAnonymous
public boolean isDefaultAllowAllAnonymous()Whether or not to allow anonymous access. Useful in certain tests and development environments. -
isConfigureDispatcherTypeAuthorization
public boolean isConfigureDispatcherTypeAuthorization()Whether dispatcher authorization should be configured. Modifying this may also cause you to adjust 'spring.security.filter.dispatcher-types'. -
getDispatcherTypeMatchersPermittedWithoutAuthorization
public jakarta.servlet.DispatcherType[] getDispatcherTypeMatchersPermittedWithoutAuthorization()The dispatcher type matchers to permit without authorization. FORWARD is necessary to allow MVC forwarding to views. -
setValidIssuers
Validation for the iss claim from the received JWT token -
setValidAudiences
Validation for the aud claim from the received JWT token. Usually this also contains all of the valid issuers from the iss claim -
setEncodedPublicKey
The encoded RSA public key used for verifying the signature of access tokens. -
setJwkSetUri
The URI to JwkSetEndpoint -
setMatchers
The set of ant path matchers on which resource security should apply. Defaults to "/**", which applies resource security on all paths. -
setDefaultAllowAllAnonymous
public void setDefaultAllowAllAnonymous(boolean defaultAllowAllAnonymous) Whether or not to allow anonymous access. Useful in certain tests and development environments. -
setConfigureDispatcherTypeAuthorization
public void setConfigureDispatcherTypeAuthorization(boolean configureDispatcherTypeAuthorization) Whether dispatcher authorization should be configured. Modifying this may also cause you to adjust 'spring.security.filter.dispatcher-types'. -
setDispatcherTypeMatchersPermittedWithoutAuthorization
public void setDispatcherTypeMatchersPermittedWithoutAuthorization(jakarta.servlet.DispatcherType[] dispatcherTypeMatchersPermittedWithoutAuthorization) The dispatcher type matchers to permit without authorization. FORWARD is necessary to allow MVC forwarding to views. -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-