Class AADAuthenticationProperties
- java.lang.Object
-
- com.azure.spring.autoconfigure.aad.AADAuthenticationProperties
-
- All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean
@Validated @ConfigurationProperties("azure.activedirectory") public class AADAuthenticationProperties extends Object implements org.springframework.beans.factory.InitializingBeanConfiguration properties for Azure Active Directory Authentication.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAADAuthenticationProperties.UserGroupPropertiesProperties dedicated to changing the behavior of how the groups are mapped from the Azure AD response.
-
Constructor Summary
Constructors Constructor Description AADAuthenticationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidafterPropertiesSet()booleanallowedGroupIdsConfigured()Whether allowed group IDs is configured.booleanallowedGroupNamesConfigured()Whether allowed group names is configured.List<String>getActiveDirectoryGroups()Gets the list of Active Directory groups.StringgetAppIdUri()Gets the App ID URI.AADApplicationTypegetApplicationType()Gets the AADApplicationType.Map<String,Object>getAuthenticateAdditionalParameters()Gets the additional authenticate parameters.Map<String,AuthorizationClientProperties>getAuthorizationClients()Gets the authorization clients.StringgetBaseUri()Gets the base URI.StringgetClientId()Gets the client ID.StringgetClientSecret()Gets the client secret.StringgetGraphBaseUri()Gets the graph base URI.StringgetGraphMembershipUri()Gets the graph membership URI.longgetJwkSetCacheLifespan()Gets the JWK set cache lifespan.longgetJwkSetCacheRefreshTime()Gets the JWK set cache refresh time.intgetJwtConnectTimeout()Gets the JWT connect timeout.intgetJwtReadTimeout()Gets the JWT read timeout.intgetJwtSizeLimit()Gets the JWT size limit.StringgetPostLogoutRedirectUri()Gets the post logout redirect URI.StringgetRedirectUriTemplate()Gets the redirect URI template.BooleangetSessionStateless()Whether the session is stateless.StringgetTenantId()Gets the tenant ID.AADAuthenticationProperties.UserGroupPropertiesgetUserGroup()Gets the user group properties.StringgetUserNameAttribute()Gets the username attribute.booleanisAllowedGroup(String group)Whether the group is allowed.booleanisAllowTelemetry()Deprecated.Determined by HTTP header User-Agent insteadvoidsetActiveDirectoryGroups(List<String> activeDirectoryGroups)Deprecated.deprecatedvoidsetAllowTelemetry(boolean allowTelemetry)Sets whether telemetry is allowed.voidsetAppIdUri(String appIdUri)Sets the App ID URI.voidsetApplicationType(AADApplicationType applicationType)Sets the AADApplicationType.voidsetAuthenticateAdditionalParameters(Map<String,Object> authenticateAdditionalParameters)Sets the additional authenticate parameters.voidsetAuthorizationClients(Map<String,AuthorizationClientProperties> authorizationClients)Sets the authorization clients.voidsetBaseUri(String baseUri)Sets the base URI.voidsetClientId(String clientId)Sets the client ID.voidsetClientSecret(String clientSecret)Sets the client secret.voidsetGraphBaseUri(String graphBaseUri)Sets the graph base URI.voidsetGraphMembershipUri(String graphMembershipUri)Sets the graph membership URI.voidsetJwkSetCacheLifespan(long jwkSetCacheLifespan)Sets the JWK set cache lifespan.voidsetJwkSetCacheRefreshTime(long jwkSetCacheRefreshTime)Sets the JWK set cache refresh time.voidsetJwtConnectTimeout(int jwtConnectTimeout)Sets the JWT connect timeout.voidsetJwtReadTimeout(int jwtReadTimeout)Sets the JWT read timeout.voidsetJwtSizeLimit(int jwtSizeLimit)Sets the JWT size limit.voidsetPostLogoutRedirectUri(String postLogoutRedirectUri)Set the post logout redirect URI.voidsetRedirectUriTemplate(String redirectUriTemplate)Sets the redirect URI template.voidsetSessionStateless(Boolean sessionStateless)Sets whether the session is stateless.voidsetTenantId(String tenantId)Sets the tenant ID.voidsetUserGroup(AADAuthenticationProperties.UserGroupProperties userGroup)Sets the user group properties.voidsetUserNameAttribute(String userNameAttribute)Sets the username attribute.
-
-
-
Method Detail
-
getApplicationType
public AADApplicationType getApplicationType()
Gets the AADApplicationType.- Returns:
- the AADApplicationType
-
setApplicationType
public void setApplicationType(AADApplicationType applicationType)
Sets the AADApplicationType.- Parameters:
applicationType- the AADApplicationType
-
getActiveDirectoryGroups
@DeprecatedConfigurationProperty(reason="Configuration moved to UserGroup class to keep UserGroup properties together", replacement="azure.activedirectory.user-group.allowed-group-names") public List<String> getActiveDirectoryGroups()Gets the list of Active Directory groups.- Returns:
- the list of Active Directory groups
-
allowedGroupNamesConfigured
public boolean allowedGroupNamesConfigured()
Whether allowed group names is configured.- Returns:
- whether allowed group names is configured
-
allowedGroupIdsConfigured
public boolean allowedGroupIdsConfigured()
Whether allowed group IDs is configured.- Returns:
- whether allowed group IDs is configured
-
getUserGroup
public AADAuthenticationProperties.UserGroupProperties getUserGroup()
Gets the user group properties.- Returns:
- the user group properties
-
setUserGroup
public void setUserGroup(AADAuthenticationProperties.UserGroupProperties userGroup)
Sets the user group properties.- Parameters:
userGroup- the user group properties
-
getClientId
public String getClientId()
Gets the client ID.- Returns:
- the client ID
-
setClientId
public void setClientId(String clientId)
Sets the client ID.- Parameters:
clientId- the client ID
-
getClientSecret
public String getClientSecret()
Gets the client secret.- Returns:
- the client secret
-
setClientSecret
public void setClientSecret(String clientSecret)
Sets the client secret.- Parameters:
clientSecret- the client secret
-
getUserNameAttribute
public String getUserNameAttribute()
Gets the username attribute.- Returns:
- the username attribute
-
setUserNameAttribute
public void setUserNameAttribute(String userNameAttribute)
Sets the username attribute.- Parameters:
userNameAttribute- the username attribute
-
getRedirectUriTemplate
public String getRedirectUriTemplate()
Gets the redirect URI template.- Returns:
- the redirect URI template
-
setRedirectUriTemplate
public void setRedirectUriTemplate(String redirectUriTemplate)
Sets the redirect URI template.- Parameters:
redirectUriTemplate- the redirect URI template
-
setActiveDirectoryGroups
@Deprecated public void setActiveDirectoryGroups(List<String> activeDirectoryGroups)
Deprecated.deprecatedSets the list of Active Directory groups.- Parameters:
activeDirectoryGroups- the list of Active Directory groups
-
getAppIdUri
public String getAppIdUri()
Gets the App ID URI.- Returns:
- the App ID URI
-
setAppIdUri
public void setAppIdUri(String appIdUri)
Sets the App ID URI.- Parameters:
appIdUri- the App ID URI
-
getAuthenticateAdditionalParameters
public Map<String,Object> getAuthenticateAdditionalParameters()
Gets the additional authenticate parameters.- Returns:
- the additional authenticate parameters
-
setAuthenticateAdditionalParameters
public void setAuthenticateAdditionalParameters(Map<String,Object> authenticateAdditionalParameters)
Sets the additional authenticate parameters.- Parameters:
authenticateAdditionalParameters- the additional authenticate parameters
-
getJwtConnectTimeout
public int getJwtConnectTimeout()
Gets the JWT connect timeout.- Returns:
- the JWT connect timeout
-
setJwtConnectTimeout
public void setJwtConnectTimeout(int jwtConnectTimeout)
Sets the JWT connect timeout.- Parameters:
jwtConnectTimeout- the JWT connect timeout
-
getJwtReadTimeout
public int getJwtReadTimeout()
Gets the JWT read timeout.- Returns:
- the JWT read timeout
-
setJwtReadTimeout
public void setJwtReadTimeout(int jwtReadTimeout)
Sets the JWT read timeout.- Parameters:
jwtReadTimeout- the JWT read timeout
-
getJwtSizeLimit
public int getJwtSizeLimit()
Gets the JWT size limit.- Returns:
- the JWT size limit
-
setJwtSizeLimit
public void setJwtSizeLimit(int jwtSizeLimit)
Sets the JWT size limit.- Parameters:
jwtSizeLimit- the JWT size limit
-
getJwkSetCacheLifespan
public long getJwkSetCacheLifespan()
Gets the JWK set cache lifespan.- Returns:
- the JWK set cache lifespan
-
setJwkSetCacheLifespan
public void setJwkSetCacheLifespan(long jwkSetCacheLifespan)
Sets the JWK set cache lifespan.- Parameters:
jwkSetCacheLifespan- the JWT set cache lifespan
-
getJwkSetCacheRefreshTime
public long getJwkSetCacheRefreshTime()
Gets the JWK set cache refresh time.- Returns:
- the JWK set cache refresh time
-
setJwkSetCacheRefreshTime
public void setJwkSetCacheRefreshTime(long jwkSetCacheRefreshTime)
Sets the JWK set cache refresh time.- Parameters:
jwkSetCacheRefreshTime- the JWK set cache refresh time
-
getTenantId
public String getTenantId()
Gets the tenant ID.- Returns:
- the tenant ID
-
setTenantId
public void setTenantId(String tenantId)
Sets the tenant ID.- Parameters:
tenantId- the tenant ID
-
getPostLogoutRedirectUri
public String getPostLogoutRedirectUri()
Gets the post logout redirect URI.- Returns:
- the post logout redirect URI
-
setPostLogoutRedirectUri
public void setPostLogoutRedirectUri(String postLogoutRedirectUri)
Set the post logout redirect URI.- Parameters:
postLogoutRedirectUri- the post logout redirect URI
-
isAllowTelemetry
@Deprecated @DeprecatedConfigurationProperty(reason="Deprecate the telemetry endpoint and use HTTP header User Agent instead.") public boolean isAllowTelemetry()
Deprecated.Determined by HTTP header User-Agent insteadWhether telemetry is allowed.- Returns:
- whether telemetry is allowed
-
setAllowTelemetry
public void setAllowTelemetry(boolean allowTelemetry)
Sets whether telemetry is allowed.- Parameters:
allowTelemetry- whether telemetry is allowed
-
getSessionStateless
public Boolean getSessionStateless()
Whether the session is stateless.- Returns:
- whether the session is stateless
-
setSessionStateless
public void setSessionStateless(Boolean sessionStateless)
Sets whether the session is stateless.- Parameters:
sessionStateless- whether the session is stateless
-
getBaseUri
public String getBaseUri()
Gets the base URI.- Returns:
- the base URI
-
setBaseUri
public void setBaseUri(String baseUri)
Sets the base URI.- Parameters:
baseUri- the base URI
-
getGraphBaseUri
public String getGraphBaseUri()
Gets the graph base URI.- Returns:
- the graph base URI
-
setGraphBaseUri
public void setGraphBaseUri(String graphBaseUri)
Sets the graph base URI.- Parameters:
graphBaseUri- the graph base URI
-
getGraphMembershipUri
public String getGraphMembershipUri()
Gets the graph membership URI.- Returns:
- the graph membership URI
-
setGraphMembershipUri
public void setGraphMembershipUri(String graphMembershipUri)
Sets the graph membership URI.- Parameters:
graphMembershipUri- the graph membership URI
-
getAuthorizationClients
public Map<String,AuthorizationClientProperties> getAuthorizationClients()
Gets the authorization clients.- Returns:
- the authorization clients
-
setAuthorizationClients
public void setAuthorizationClients(Map<String,AuthorizationClientProperties> authorizationClients)
Sets the authorization clients.- Parameters:
authorizationClients- the authorization clients
-
isAllowedGroup
public boolean isAllowedGroup(String group)
Whether the group is allowed.- Parameters:
group- the group- Returns:
- whether the group is allowed
-
afterPropertiesSet
public void afterPropertiesSet()
- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean
-
-