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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.client.registration.ClientRegistration
findByRegistrationId
(String registrationId) Gets the set of Azure client access token scopes.Iterator<org.springframework.security.oauth2.client.registration.ClientRegistration>
iterator()
static int
resourceServerCount
(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 Details
-
AZURE_CLIENT_REGISTRATION_ID
Azure client registration ID- See Also:
-
-
Constructor Details
-
AadClientRegistrationRepository
Creates a new instance ofAadClientRegistrationRepository
.- Parameters:
properties
- the AAD authentication properties
-
-
Method Details
-
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:
findByRegistrationId
in interfaceorg.springframework.security.oauth2.client.registration.ClientRegistrationRepository
-
iterator
public Iterator<org.springframework.security.oauth2.client.registration.ClientRegistration> iterator() -
resourceServerCount
Gets the resource server count.- Parameters:
scopes
- the set of scope- Returns:
- the resource server count
-