Class OauthConfigurationProperties
java.lang.Object
io.micronaut.security.oauth2.configuration.OauthConfigurationProperties
- All Implemented Interfaces:
io.micronaut.core.util.Toggleable
,OauthConfiguration
@ConfigurationProperties("micronaut.security.oauth2")
public class OauthConfigurationProperties
extends Object
implements OauthConfiguration
ConfigurationProperties
implementation of OauthClientConfiguration
.- Since:
- 1.2.0
- Author:
- Sergio del Amo
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
OpenID configuration. -
Field Summary
Modifier and TypeFieldDescriptionstatic final boolean
The default enable value.static final String
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription@NonNull String
@NonNull String
@NonNull OpenIdConfiguration
boolean
void
setCallbackUri
(@NonNull String callbackUri) The URI template that OAuth 2.0 providers can use to submit an authorization callback request.void
setDefaultProvider
(String defaultProvider) The default authentication provider for an OAuth 2.0 authorization code grant flow.void
setEnabled
(boolean enabled) Sets whether the OAuth 2.0 support is enabled.void
setLoginUri
(@NonNull String loginUri) The URI template that is used to initiate an OAuth 2.0 authorization code grant flow.void
setOpenid
(@NonNull OauthConfigurationProperties.OpenIdConfigurationProperties openid) The OpenID configuration.
-
Field Details
-
PREFIX
- See Also:
-
DEFAULT_ENABLED
public static final boolean DEFAULT_ENABLEDThe default enable value.- See Also:
-
-
Constructor Details
-
OauthConfigurationProperties
public OauthConfigurationProperties()
-
-
Method Details
-
isEnabled
public boolean isEnabled()- Specified by:
isEnabled
in interfaceio.micronaut.core.util.Toggleable
-
setEnabled
public void setEnabled(boolean enabled) Sets whether the OAuth 2.0 support is enabled. Default value (true).- Parameters:
enabled
- True if is enabled
-
getLoginUri
- Specified by:
getLoginUri
in interfaceOauthConfiguration
- Returns:
- the login Uri
-
setLoginUri
The URI template that is used to initiate an OAuth 2.0 authorization code grant flow. Default value ("/oauth/login{/provider}").- Parameters:
loginUri
- The Login uri
-
getCallbackUri
- Specified by:
getCallbackUri
in interfaceOauthConfiguration
- Returns:
- the Callback Uri
-
setDefaultProvider
The default authentication provider for an OAuth 2.0 authorization code grant flow.- Parameters:
defaultProvider
- The default authentication provider
-
getDefaultProvider
- Specified by:
getDefaultProvider
in interfaceOauthConfiguration
- Returns:
- the default authorization provider
-
setCallbackUri
The URI template that OAuth 2.0 providers can use to submit an authorization callback request. Default value ("/oauth/callback{/provider}").- Parameters:
callbackUri
- The callback Uri
-
getOpenid
- Specified by:
getOpenid
in interfaceOauthConfiguration
- Returns:
- OpenID Connect Configuration
-
setOpenid
public void setOpenid(@NonNull @NonNull OauthConfigurationProperties.OpenIdConfigurationProperties openid) The OpenID configuration.- Parameters:
openid
- The OpenID configuration
-