Class ServiceClientRegistrationMapper
java.lang.Object
com.irurueta.authserver.serviceclient.infrastructure.resourceserver.ServiceClientRegistrationMapper
Builds the OAuth2 client registrations of the service client from its settings: one for the client credentials
grant and one for the token exchange grant, which share the client's identity and authentication.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.client.registration.ClientRegistrationclientCredentials(ServiceClientAuthProperties properties) Builds the registration of the client credentials grant.private static org.springframework.security.oauth2.client.registration.ClientRegistrationregistration(String registrationId, org.springframework.security.oauth2.core.AuthorizationGrantType grantType, ServiceClientAuthProperties properties) Builds a registration.org.springframework.security.oauth2.client.registration.ClientRegistrationtokenExchange(ServiceClientAuthProperties properties) Builds the registration of the token exchange grant.
-
Field Details
-
CLIENT_CREDENTIALS_REGISTRATION_ID
Registration id of the client credentials grant.- See Also:
-
TOKEN_EXCHANGE_REGISTRATION_ID
Registration id of the token exchange grant.- See Also:
-
-
Constructor Details
-
ServiceClientRegistrationMapper
public ServiceClientRegistrationMapper()
-
-
Method Details
-
clientCredentials
public org.springframework.security.oauth2.client.registration.ClientRegistration clientCredentials(ServiceClientAuthProperties properties) Builds the registration of the client credentials grant.- Parameters:
properties- settings of the service client.- Returns:
- the registration.
-
tokenExchange
public org.springframework.security.oauth2.client.registration.ClientRegistration tokenExchange(ServiceClientAuthProperties properties) Builds the registration of the token exchange grant.- Parameters:
properties- settings of the service client.- Returns:
- the registration.
-
registration
private static org.springframework.security.oauth2.client.registration.ClientRegistration registration(String registrationId, org.springframework.security.oauth2.core.AuthorizationGrantType grantType, ServiceClientAuthProperties properties) Builds a registration.- Parameters:
registrationId- id of the registration.grantType- grant the registration is for.properties- settings of the service client.- Returns:
- the registration.
-