Class OauthClientConfigurationProperties
java.lang.Object
io.micronaut.security.oauth2.configuration.OauthClientConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable,OauthClientConfiguration
@Context
@EachProperty("micronaut.security.oauth2.clients")
public class OauthClientConfigurationProperties
extends Object
implements OauthClientConfiguration
Stores configuration of each configured OAuth 2.0 client.
- Since:
- 1.2.0
- Author:
- James Kleeh
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classOAuth 2.0 authorization endpoint configuration.static classClient credentials configuration.static classIntrospection endpoint configuration.static classOpenID client configuration.static classRevocation endpoint configuration.static classOAuth 2.0 token endpoint configuration. -
Field Summary
FieldsFields inherited from interface io.micronaut.security.oauth2.configuration.OauthClientConfiguration
DEFAULT_ADVANCED_EXPIRATION, DEFAULT_AUTHENTICATION_METHOD -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<ClientCredentialsConfiguration>@NonNull String@Nullable String@NonNull GrantType@NonNull StringgetName()getToken()booleanvoidsetAuthorization(OauthClientConfigurationProperties.AuthorizationEndpointConfigurationProperties authorization) The OAuth 2.0 authorization endpoint configuration.voidsetClientCredentials(@NonNull OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties clientCredentials) Sets the Client Credentials configuration.voidsetClientId(@NonNull String clientId) OAuth 2.0 client id.voidsetClientSecret(@Nullable String clientSecret) OAuth 2.0 client secret.voidsetEnabled(boolean enabled) Sets whether the client is enabled.voidsetGrantType(@NonNull GrantType grantType) OAuth 2.0 grant type.voidsetIntrospection(OauthClientConfigurationProperties.IntrospectionEndpointConfigurationProperties introspection) Sets the introspection endpoint configuration.voidThe open id configuration.voidsetRevocation(OauthClientConfigurationProperties.RevocationEndpointConfigurationProperties revocation) Sets the revocation endpoint configuration.voidRequested scopes.voidThe OAuth 2.0 token endpoint configuration.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.security.oauth2.configuration.OauthClientConfiguration
getTokenEndpoint
-
Field Details
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
OauthClientConfigurationProperties
- Parameters:
name- The provider name
-
-
Method Details
-
getClientId
- Specified by:
getClientIdin interfaceOauthClientConfiguration- Returns:
- The client id
-
setClientId
OAuth 2.0 client id.- Parameters:
clientId- The client id
-
getClientSecret
- Specified by:
getClientSecretin interfaceOauthClientConfiguration- Returns:
- The client secret
-
setClientSecret
OAuth 2.0 client secret.- Parameters:
clientSecret- The client secret
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabledin interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the client is enabled. Default value (true).- Parameters:
enabled- The enabled flag
-
getScopes
- Specified by:
getScopesin interfaceOauthClientConfiguration- Returns:
- The scopes requested
-
setScopes
Requested scopes. If not specified for OAuth 2.0 clients using OpenID Connect it defaults to `profile`, `email` and `idtoken`- Parameters:
scopes- The scopes
-
getName
- Specified by:
getNamein interfaceOauthClientConfiguration- Returns:
- The provider name
-
getGrantType
- Specified by:
getGrantTypein interfaceOauthClientConfiguration- Returns:
- The grant type
-
setGrantType
OAuth 2.0 grant type. Default value (authorization_code).- Parameters:
grantType- The grant type
-
getToken
- Specified by:
getTokenin interfaceOauthClientConfiguration- Returns:
- The optional token endpoint configuration
- See Also:
-
setToken
The OAuth 2.0 token endpoint configuration.- Parameters:
token- The token endpoint configuration
-
getAuthorization
- Specified by:
getAuthorizationin interfaceOauthClientConfiguration- Returns:
- The optional authorization endpoint configuration
- See Also:
-
getClientCredentials
- Specified by:
getClientCredentialsin interfaceOauthClientConfiguration- Returns:
- The Client Credentials Configuration
-
setClientCredentials
public void setClientCredentials(@NonNull @NonNull OauthClientConfigurationProperties.ClientCredentialsConfigurationProperties clientCredentials) Sets the Client Credentials configuration.- Parameters:
clientCredentials- client credentials configuration
-
setAuthorization
public void setAuthorization(OauthClientConfigurationProperties.AuthorizationEndpointConfigurationProperties authorization) The OAuth 2.0 authorization endpoint configuration.- Parameters:
authorization- The authorization endpoint configuration
-
getOpenid
- Specified by:
getOpenidin interfaceOauthClientConfiguration- Returns:
- The open id configuration
-
setOpenid
public void setOpenid(OauthClientConfigurationProperties.OpenIdClientConfigurationProperties openid) The open id configuration.- Parameters:
openid- The open id configuration
-
getIntrospection
- Specified by:
getIntrospectionin interfaceOauthClientConfiguration- Returns:
- The introspection endpoint configuration
- See Also:
-
setIntrospection
public void setIntrospection(OauthClientConfigurationProperties.IntrospectionEndpointConfigurationProperties introspection) Sets the introspection endpoint configuration.- Parameters:
introspection- The introspection endpoint configuration
-
getRevocation
- Specified by:
getRevocationin interfaceOauthClientConfiguration- Returns:
- The revocation endpoint configuration
- See Also:
-
setRevocation
public void setRevocation(OauthClientConfigurationProperties.RevocationEndpointConfigurationProperties revocation) Sets the revocation endpoint configuration.- Parameters:
revocation- The revocation endpoint configuration
-