Package org.springframework.security.cas.authentication

# Class CasServiceTicketAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.cas.authentication.CasServiceTicketAuthenticationToken

All Implemented Interfaces:
  `Serializable`, `Principal`, `org.springframework.security.core.Authentication`, `org.springframework.security.core.CredentialsContainer`

public class CasServiceTicketAuthenticationToken extends org.springframework.security.authentication.AbstractAuthenticationToken
An `Authentication` implementation that is designed to process CAS service ticket.

Since:
  6.1
See Also:
  - Serialized Form

## Constructor Summary

Constructors
Constructor
Description
`CasServiceTicketAuthenticationToken(String identifier, Object credentials)`
This constructor can be safely used by any code that wishes to create a `CasServiceTicketAuthenticationToken`, as the `AbstractAuthenticationToken.isAuthenticated()` will return `false`.
`CasServiceTicketAuthenticationToken(String identifier, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)`
This constructor should only be used by `AuthenticationManager` or `AuthenticationProvider` implementations that are satisfied with producing a trusted (i.e.

## Method Summary

Modifier and Type
Method
Description
`void`
`eraseCredentials()`
`Object`
`getCredentials()`
`Object`
`getPrincipal()`
`boolean`
`isStateless()`
`void`
`setAuthenticated(boolean isAuthenticated)`
`static CasServiceTicketAuthenticationToken`
`stateful(Object credentials)`
`static CasServiceTicketAuthenticationToken`
`stateless(Object credentials)`

### Methods inherited from class org.springframework.security.authentication.AbstractAuthenticationToken

`equals, getAuthorities, getDetails, getName, hashCode, isAuthenticated, setDetails, toString`

### Methods inherited from class java.lang.Object

`clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface java.security.Principal

`implies`

## Constructor Details

### CasServiceTicketAuthenticationToken

public CasServiceTicketAuthenticationToken(String identifier, Object credentials)
This constructor can be safely used by any code that wishes to create a `CasServiceTicketAuthenticationToken`, as the `AbstractAuthenticationToken.isAuthenticated()` will return `false`.

### CasServiceTicketAuthenticationToken

public CasServiceTicketAuthenticationToken(String identifier, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
This constructor should only be used by `AuthenticationManager` or `AuthenticationProvider` implementations that are satisfied with producing a trusted (i.e. `AbstractAuthenticationToken.isAuthenticated()` = `true`) authentication token.

Parameters:
  `identifier` -
  `credentials` -
  `authorities` -

## Method Details

### stateful

public static CasServiceTicketAuthenticationToken stateful(Object credentials)

### stateless

public static CasServiceTicketAuthenticationToken stateless(Object credentials)

### isStateless

public boolean isStateless()

### getCredentials

public Object getCredentials()

### getPrincipal

public Object getPrincipal()

### setAuthenticated

public void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException

Specified by:
  `setAuthenticated` in interface `org.springframework.security.core.Authentication`
Overrides:
  `setAuthenticated` in class `org.springframework.security.authentication.AbstractAuthenticationToken`
Throws:
  `IllegalArgumentException`

### eraseCredentials

public void eraseCredentials()

Specified by:
  `eraseCredentials` in interface `org.springframework.security.core.CredentialsContainer`
Overrides:
  `eraseCredentials` in class `org.springframework.security.authentication.AbstractAuthenticationToken`