Class AadClientRegistrationRepository
- java.lang.Object
-
- com.azure.spring.cloud.autoconfigure.aad.AadClientRegistrationRepository
-
- All Implemented Interfaces:
Iterable<org.springframework.security.oauth2.client.registration.ClientRegistration>,org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
public class AadClientRegistrationRepository extends Object implements org.springframework.security.oauth2.client.registration.ClientRegistrationRepository, Iterable<org.springframework.security.oauth2.client.registration.ClientRegistration>
Manage all AAD OAuth2 clients configured by property "spring.cloud.azure.active-directory.xxx". Do extra works: 1. Make "azure" client's scope contains all "azure_delegated" clients' scope. This scope is used to request authorize code. 2. Save azureClientAccessTokenScopes, this scope is used to request "azure" client's access_token.
-
-
Field Summary
Fields Modifier and Type Field Description static StringAZURE_CLIENT_REGISTRATION_IDAzure client registration ID
-
Constructor Summary
Constructors Constructor Description AadClientRegistrationRepository(AadAuthenticationProperties properties)Creates a new instance ofAadClientRegistrationRepository.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.security.oauth2.client.registration.ClientRegistrationfindByRegistrationId(String registrationId)Set<String>getAzureClientAccessTokenScopes()Gets the set of Azure client access token scopes.Iterator<org.springframework.security.oauth2.client.registration.ClientRegistration>iterator()static intresourceServerCount(Set<String> scopes)Gets the resource server count.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
AZURE_CLIENT_REGISTRATION_ID
public static final String AZURE_CLIENT_REGISTRATION_ID
Azure client registration ID- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AadClientRegistrationRepository
public AadClientRegistrationRepository(AadAuthenticationProperties properties)
Creates a new instance ofAadClientRegistrationRepository.- Parameters:
properties- the AAD authentication properties
-
-
Method Detail
-
getAzureClientAccessTokenScopes
public Set<String> getAzureClientAccessTokenScopes()
Gets the set of Azure client access token scopes.- Returns:
- the set of Azure client access token scopes
-
findByRegistrationId
public org.springframework.security.oauth2.client.registration.ClientRegistration findByRegistrationId(String registrationId)
- Specified by:
findByRegistrationIdin interfaceorg.springframework.security.oauth2.client.registration.ClientRegistrationRepository
-
iterator
public Iterator<org.springframework.security.oauth2.client.registration.ClientRegistration> iterator()
-
-