Class ClientIdentityProviderProperties.ClientProperties
- Enclosing class:
- ClientIdentityProviderProperties
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionMap of the registered 3rd-party identity providers that should be used by this type of client.booleanEnable registering new users automatically after successful authentication.booleanWhether to hide the 1st-party sign-in form provided by Broadleaf and instead redirect the user to an external 3rd-party identity provider for authentication.voidsetAutoRegister(boolean autoRegister) Enable registering new users automatically after successful authentication.voidsetHideFirstPartyForm(boolean hideFirstPartyForm) Whether to hide the 1st-party sign-in form provided by Broadleaf and instead redirect the user to an external 3rd-party identity provider for authentication.voidMap of the registered 3rd-party identity providers that should be used by this type of client.
-
Constructor Details
-
ClientProperties
public ClientProperties()
-
-
Method Details
-
isHideFirstPartyForm
public boolean isHideFirstPartyForm()Whether to hide the 1st-party sign-in form provided by Broadleaf and instead redirect the user to an external 3rd-party identity provider for authentication.Ensure that if this is false, that there is at least one provider specified in
providers. If there is more than one, the user will be prompted to select one. -
isAutoRegister
public boolean isAutoRegister()Enable registering new users automatically after successful authentication. False by default. -
getProviders
Map of the registered 3rd-party identity providers that should be used by this type of client.For example, an admin client might use only Okta, while the storefront (commerce) shows the 1st party form along with options to sign with Google, Facebook, or GitHub. The keys should match what was configured under
spring.security.oauth2.client.registration, e.g.,google,github,facebook,okta. The map values can include the path of an asset on a CDN or in the auth app itself (e.g.,/img/google-icon.svg) that should be displayed to the user next to the name of the provider.In the previous example, to have the admin automatically redirect to Okta and not show Broadleaf's 1st-party sign in form, also set
hideFirstPartyFormtofalse -
setHideFirstPartyForm
public void setHideFirstPartyForm(boolean hideFirstPartyForm) Whether to hide the 1st-party sign-in form provided by Broadleaf and instead redirect the user to an external 3rd-party identity provider for authentication.Ensure that if this is false, that there is at least one provider specified in
providers. If there is more than one, the user will be prompted to select one. -
setAutoRegister
public void setAutoRegister(boolean autoRegister) Enable registering new users automatically after successful authentication. False by default. -
setProviders
public void setProviders(Map<String, ClientIdentityProviderProperties.ClientProperties.Provider> providers) Map of the registered 3rd-party identity providers that should be used by this type of client.For example, an admin client might use only Okta, while the storefront (commerce) shows the 1st party form along with options to sign with Google, Facebook, or GitHub. The keys should match what was configured under
spring.security.oauth2.client.registration, e.g.,google,github,facebook,okta. The map values can include the path of an asset on a CDN or in the auth app itself (e.g.,/img/google-icon.svg) that should be displayed to the user next to the name of the provider.In the previous example, to have the admin automatically redirect to Okta and not show Broadleaf's 1st-party sign in form, also set
hideFirstPartyFormtofalse
-