Class DefaultAuthServerCreationHandler
java.lang.Object
com.broadleafcommerce.auth.tenant.service.DefaultAuthServerCreationHandler
- All Implemented Interfaces:
AuthServerCreationHandler
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultAuthServerCreationHandler(AuthorizationServerService<AuthorizationServer> serverService, AuthorizedClientService<AuthorizedClient> clientService, DefaultAuthServerProperties defaultAuthServerProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanapplicationAlreadyHasClient(Application application) protected StringbuildRedirectUri(String defaultRedirectUri, String templateVariableName, @NonNull Application application) buildRedirectUris(@NonNull Set<String> defaultRedirectUris, String templateVariableName, @NonNull Application application) protected AuthorizationServercreateAuthorizationServer(Application application, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) protected voidcreateAuthorizedClient(Application application, AuthorizationServer authorizationServer, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) protected AuthorizationServercreateNewAuthServer(Application application, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) protected AuthorizedClientService<AuthorizedClient>protected DefaultAuthServerPropertiesprotected Set<UserPermissionRef>getDefaultPermissions(DefaultAuthServerProperties.AuthServerProperties defaultAuthServerProperties) getDefaultPostAuthSuccessRedirectUris(DefaultAuthServerProperties.AuthServerProperties properties, @NonNull Application application) protected StringgetDefaultRedirectUri(Application application, DefaultAuthServerProperties.AuthServerProperties properties) protected Set<UserRoleRef>getDefaultUserRoles(DefaultAuthServerProperties.AuthServerProperties defaultAuthServerProperties) protected StringgetFormattedIdentifier(@NonNull Application application) Formats the identifier as all lowercase ifApplication.getIdentifierType()isResolutionIdentifierType.DOMAINorResolutionIdentifierType.DOMAIN_PREFIXsince domains are case-insensitive but Spring does not treat them as such.getRedirectUris(DefaultAuthServerProperties.AuthServerProperties properties, @NonNull Application application) protected Stringprotected AuthorizationServerService<AuthorizationServer>protected com.broadleafcommerce.common.extension.TypeFactoryvoidhandleAuthServerCreation(Application application, String friendlyName) Creates necessary authorization servers and clients when a new application is created.protected booleanisContextPathResolution(Application application) protected booleanisDomainPrefixResolution(Application application) protected booleanisDomainResolution(Application application) protected booleanisParameterResolution(Application application)
-
Field Details
-
DEFAULT_GRANT_TYPE
-
DEFAULT_AUTH_METHOD
-
-
Constructor Details
-
DefaultAuthServerCreationHandler
public DefaultAuthServerCreationHandler(AuthorizationServerService<AuthorizationServer> serverService, AuthorizedClientService<AuthorizedClient> clientService, DefaultAuthServerProperties defaultAuthServerProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
handleAuthServerCreation
Description copied from interface:AuthServerCreationHandlerCreates necessary authorization servers and clients when a new application is created.- Specified by:
handleAuthServerCreationin interfaceAuthServerCreationHandler- Parameters:
application- The newly created applicationfriendlyName- The user readable name to be used when creating the auth server and client.
-
applicationAlreadyHasClient
-
createAuthorizedClient
protected void createAuthorizedClient(Application application, AuthorizationServer authorizationServer, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) -
getResetPasswordBaseUri
protected String getResetPasswordBaseUri(DefaultAuthServerProperties.AuthServerProperties properties) -
getGrantTypes
-
getAuthenticationMethods
protected Set<String> getAuthenticationMethods(DefaultAuthServerProperties.AuthServerProperties properties) -
getDefaultRedirectUri
protected String getDefaultRedirectUri(Application application, DefaultAuthServerProperties.AuthServerProperties properties) -
getRedirectUris
protected Set<String> getRedirectUris(@NonNull DefaultAuthServerProperties.AuthServerProperties properties, @NonNull @NonNull Application application) -
buildRedirectUris
-
getDefaultPostAuthSuccessRedirectUris
protected Set<String> getDefaultPostAuthSuccessRedirectUris(@NonNull DefaultAuthServerProperties.AuthServerProperties properties, @NonNull @NonNull Application application) -
buildRedirectUri
@Nullable protected String buildRedirectUri(@Nullable String defaultRedirectUri, String templateVariableName, @NonNull @NonNull Application application) -
getFormattedIdentifier
Formats the identifier as all lowercase ifApplication.getIdentifierType()isResolutionIdentifierType.DOMAINorResolutionIdentifierType.DOMAIN_PREFIXsince domains are case-insensitive but Spring does not treat them as such.- Parameters:
application- The application that was created.- Returns:
- The formatted identifier value
-
createAuthorizationServer
protected AuthorizationServer createAuthorizationServer(Application application, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) -
createNewAuthServer
protected AuthorizationServer createNewAuthServer(Application application, DefaultAuthServerProperties.AuthServerProperties properties, String friendlyName) -
getDefaultPermissions
protected Set<UserPermissionRef> getDefaultPermissions(DefaultAuthServerProperties.AuthServerProperties defaultAuthServerProperties) -
getDefaultUserRoles
protected Set<UserRoleRef> getDefaultUserRoles(DefaultAuthServerProperties.AuthServerProperties defaultAuthServerProperties) -
isDomainPrefixResolution
-
isParameterResolution
-
isContextPathResolution
-
isDomainResolution
-
getServerService
-
getClientService
-
getDefaultAuthServerProperties
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-