public class WindowsAuthenticationToken extends Object implements org.springframework.security.core.Authentication
Modifier and Type | Field and Description |
---|---|
static org.springframework.security.core.GrantedAuthority |
DEFAULT_GRANTED_AUTHORITY
The
GrantedAuthority that will be added to every WindowsAuthenticationToken, unless another (or null) is
specified. |
static GrantedAuthorityFactory |
DEFAULT_GRANTED_AUTHORITY_FACTORY
The
GrantedAuthorityFactory that is used by default if a custom one is not specified. |
Constructor and Description |
---|
WindowsAuthenticationToken(WindowsPrincipal identity)
Convenience constructor that calls
WindowsAuthenticationToken(WindowsPrincipal, GrantedAuthorityFactory, GrantedAuthority) with:
the given identity,
the DEFAULT_GRANTED_AUTHORITY_FACTORY
the DEFAULT_GRANTED_AUTHORITY
. |
WindowsAuthenticationToken(WindowsPrincipal identity,
GrantedAuthorityFactory grantedAuthorityFactory,
org.springframework.security.core.GrantedAuthority defaultGrantedAuthority)
Instantiates a new windows authentication token.
|
Modifier and Type | Method and Description |
---|---|
Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities() |
Object |
getCredentials() |
Object |
getDetails() |
String |
getName() |
Object |
getPrincipal() |
boolean |
isAuthenticated() |
void |
setAuthenticated(boolean authenticated) |
public static final GrantedAuthorityFactory DEFAULT_GRANTED_AUTHORITY_FACTORY
GrantedAuthorityFactory
that is used by default if a custom one is not specified. This default
GrantedAuthorityFactory
is a FqnGrantedAuthorityFactory
with prefix "ROLE_"
and will
convert the fqn to uppercasepublic static final org.springframework.security.core.GrantedAuthority DEFAULT_GRANTED_AUTHORITY
GrantedAuthority
that will be added to every WindowsAuthenticationToken, unless another (or null) is
specified.public WindowsAuthenticationToken(WindowsPrincipal identity)
WindowsAuthenticationToken(WindowsPrincipal, GrantedAuthorityFactory, GrantedAuthority)
with:
DEFAULT_GRANTED_AUTHORITY_FACTORY
DEFAULT_GRANTED_AUTHORITY
identity
- The WindowsPrincipal
for which this token exists.public WindowsAuthenticationToken(WindowsPrincipal identity, GrantedAuthorityFactory grantedAuthorityFactory, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority)
identity
- The WindowsPrincipal
for which this token exists.grantedAuthorityFactory
- used to construct GrantedAuthority
s for each of the groups to which the
WindowsPrincipal
belongsdefaultGrantedAuthority
- if not null, this GrantedAuthority
will always be added to the granted authorities listpublic Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
getAuthorities
in interface org.springframework.security.core.Authentication
public Object getCredentials()
getCredentials
in interface org.springframework.security.core.Authentication
public Object getDetails()
getDetails
in interface org.springframework.security.core.Authentication
public Object getPrincipal()
getPrincipal
in interface org.springframework.security.core.Authentication
public boolean isAuthenticated()
isAuthenticated
in interface org.springframework.security.core.Authentication
public void setAuthenticated(boolean authenticated)
setAuthenticated
in interface org.springframework.security.core.Authentication
Copyright © 2010–2015 com.github.dblock. All rights reserved.