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 Details

    • AZURE_CLIENT_REGISTRATION_ID

      public static final String AZURE_CLIENT_REGISTRATION_ID
      Azure client registration ID
      See Also:
  • Constructor Details

  • Method Details

    • 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:
      findByRegistrationId in interface org.springframework.security.oauth2.client.registration.ClientRegistrationRepository
    • iterator

      public Iterator<org.springframework.security.oauth2.client.registration.ClientRegistration> iterator()
      Specified by:
      iterator in interface Iterable<org.springframework.security.oauth2.client.registration.ClientRegistration>
    • resourceServerCount

      public static int resourceServerCount(Set<String> scopes)
      Gets the resource server count.
      Parameters:
      scopes - the set of scope
      Returns:
      the resource server count