Class CasAuthenticationToken.Builder<B extends CasAuthenticationToken.Builder<B>>
java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>
org.springframework.security.cas.authentication.CasAuthenticationToken.Builder<B>
- All Implemented Interfaces:
Authentication.Builder<B>
- Enclosing class:
- CasAuthenticationToken
public static class CasAuthenticationToken.Builder<B extends CasAuthenticationToken.Builder<B>>
extends AbstractAuthenticationToken.AbstractAuthenticationBuilder<B>
A builder of
CasAuthenticationToken
instances- Since:
- 7.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionassertion
(org.apereo.cas.client.validation.Assertion assertion) Use thisAssertion
build()
Build anAuthentication
instancecredentials
(@Nullable Object credentials) Use this credential.Use this keyUse this principal.userDetails
(UserDetails userDetails) Use thisUserDetails
Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken.AbstractAuthenticationBuilder
authenticated, authorities, details
-
Constructor Details
-
Builder
-
-
Method Details
-
key
Use this key- Parameters:
key
- the key to use- Returns:
- the
CasAuthenticationToken.Builder
for further configurations
-
principal
Description copied from interface:Authentication.Builder
Use this principal.Note that in many cases, the principal is strongly-typed. Implementations may choose to do a type check and are not necessarily expected to allow any object as a principal.
Implementations may choose to use this
principal
in combination with any principal from the pre-existingAuthentication
instance.- Parameters:
principal
- the principal to use- Returns:
- the
Authentication.Builder
for additional configuration - See Also:
-
credentials
Description copied from interface:Authentication.Builder
Use this credential.Note that since some credentials are insecure to store, this method is implemented as unsupported by default. Only implement or use this method if you support secure storage of the credential or if your implementation also implements
CredentialsContainer
and the credentials are thereby erased.- Parameters:
credentials
- the credentials to use- Returns:
- the
Authentication.Builder
for additional configuration - See Also:
-
userDetails
Use thisUserDetails
- Parameters:
userDetails
- theUserDetails
to use- Returns:
- the
CasAuthenticationToken.Builder
for further configurations
-
assertion
Use thisAssertion
- Parameters:
assertion
- theAssertion
to use- Returns:
- the
CasAuthenticationToken.Builder
for further configurations
-
build
Description copied from interface:Authentication.Builder
Build anAuthentication
instance- Returns:
- the
Authentication
instance
-