Package com.logicaldoc.core.security.spring

# Class LDAuthenticationToken

java.lang.Object
org.springframework.security.authentication.AbstractAuthenticationToken
org.springframework.security.authentication.UsernamePasswordAuthenticationToken
com.logicaldoc.core.security.spring.LDAuthenticationToken

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

public class LDAuthenticationToken extends org.springframework.security.authentication.UsernamePasswordAuthenticationToken
A LogicalDOC aware authentication token

Since:
  7.5
Author:
  Marco Meschieri - LogicalDOC
See Also:
  - Serialized Form

## Field Summary

Fields
Modifier and Type
Field
Description
`static final String`
`COOKIE_SID`
`static final String`
`PARAM_SID`

## Constructor Summary

Constructors
Constructor
Description
`LDAuthenticationToken()`
`LDAuthenticationToken(Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)`
`LDAuthenticationToken(String username)`
Constructor for the anonymous login

## Method Summary

Modifier and Type
Method
Description
`boolean`
`equals(Object obj)`
`String`
`getSid()`
`int`
`hashCode()`
`boolean`
`isAnonymous()`
`void`
`setSid(String sid)`
`String`
`toString()`

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

`authenticated, eraseCredentials, getCredentials, getPrincipal, setAuthenticated, unauthenticated`

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

`getAuthorities, getDetails, getName, isAuthenticated, setDetails`

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

`getClass, notify, notifyAll, wait, wait, wait`

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

`implies`

## Field Details

### COOKIE_SID

public static final String COOKIE_SID

See Also:
  - Constant Field Values

### PARAM_SID

public static final String PARAM_SID

See Also:
  - Constant Field Values

## Constructor Details

### LDAuthenticationToken

public LDAuthenticationToken(String username)
Constructor for the anonymous login

Parameters:
  `username` - the username

### LDAuthenticationToken

public LDAuthenticationToken(Object principal, Object credentials, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)

### LDAuthenticationToken

public LDAuthenticationToken()

## Method Details

### getSid

public String getSid()

### setSid

public void setSid(String sid)

### isAnonymous

public boolean isAnonymous()

### toString

public String toString()

Specified by:
  `toString` in interface `Principal`
Overrides:
  `toString` in class `org.springframework.security.authentication.AbstractAuthenticationToken`

### hashCode

public int hashCode()

Specified by:
  `hashCode` in interface `Principal`
Overrides:
  `hashCode` in class `org.springframework.security.authentication.AbstractAuthenticationToken`

### equals

public boolean equals(Object obj)

Specified by:
  `equals` in interface `Principal`
Overrides:
  `equals` in class `org.springframework.security.authentication.AbstractAuthenticationToken`