Class TenantAwareOAuth2AuthorizedClient
java.lang.Object
org.springframework.security.oauth2.client.OAuth2AuthorizedClient
com.broadleafcommerce.auth.client.domain.TenantAwareOAuth2AuthorizedClient
- All Implemented Interfaces:
Serializable
public class TenantAwareOAuth2AuthorizedClient
extends org.springframework.security.oauth2.client.OAuth2AuthorizedClient
Extension of Spring's
OAuth2AuthorizedClient
that is aware of which tenant it is in.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTenantAwareOAuth2AuthorizedClient
(String tenantId, org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration, String principalName, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken) -
Method Summary
Methods inherited from class org.springframework.security.oauth2.client.OAuth2AuthorizedClient
getAccessToken, getClientRegistration, getPrincipalName, getRefreshToken
-
Constructor Details
-
TenantAwareOAuth2AuthorizedClient
public TenantAwareOAuth2AuthorizedClient(String tenantId, org.springframework.security.oauth2.client.registration.ClientRegistration clientRegistration, String principalName, org.springframework.security.oauth2.core.OAuth2AccessToken accessToken, @Nullable org.springframework.security.oauth2.core.OAuth2RefreshToken refreshToken)
-
-
Method Details
-
getTenantId
The tenant ID this client is for. This should match theOAuthClientRegistrationWrapper.getTenantId()
from the client registration.
-