java.lang.Object
waffle.spring.WindowsAuthenticationToken
- All Implemented Interfaces:
Serializable,Principal,org.springframework.security.core.Authentication
public class WindowsAuthenticationToken
extends Object
implements org.springframework.security.core.Authentication
A Windows authentication token.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final org.springframework.security.core.GrantedAuthorityTheGrantedAuthoritythat will be added to every WindowsAuthenticationToken, unless another (or null) is specified.static final GrantedAuthorityFactoryTheGrantedAuthorityFactorythat is used by default if a custom one is not specified. -
Constructor Summary
ConstructorsConstructorDescriptionWindowsAuthenticationToken(waffle.servlet.WindowsPrincipal identity) Convenience constructor that callsWindowsAuthenticationToken(WindowsPrincipal, GrantedAuthorityFactory, GrantedAuthority)with: the given identity, theDEFAULT_GRANTED_AUTHORITY_FACTORYtheDEFAULT_GRANTED_AUTHORITY.WindowsAuthenticationToken(waffle.servlet.WindowsPrincipal identity, GrantedAuthorityFactory grantedAuthorityFactory, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority) Instantiates a new windows authentication token. -
Method Summary
Modifier and TypeMethodDescriptionCollection<org.springframework.security.core.GrantedAuthority> getName()booleanvoidsetAuthenticated(boolean authenticated)
-
Field Details
-
DEFAULT_GRANTED_AUTHORITY_FACTORY
TheGrantedAuthorityFactorythat is used by default if a custom one is not specified. This defaultGrantedAuthorityFactoryis aFqnGrantedAuthorityFactorywith prefix"ROLE_"and will convert the fqn to uppercase -
DEFAULT_GRANTED_AUTHORITY
public static final org.springframework.security.core.GrantedAuthority DEFAULT_GRANTED_AUTHORITYTheGrantedAuthoritythat will be added to every WindowsAuthenticationToken, unless another (or null) is specified.
-
-
Constructor Details
-
WindowsAuthenticationToken
public WindowsAuthenticationToken(waffle.servlet.WindowsPrincipal identity) Convenience constructor that callsWindowsAuthenticationToken(WindowsPrincipal, GrantedAuthorityFactory, GrantedAuthority)with:- the given identity,
- the
DEFAULT_GRANTED_AUTHORITY_FACTORY - the
DEFAULT_GRANTED_AUTHORITY
- Parameters:
identity- the identity
-
WindowsAuthenticationToken
public WindowsAuthenticationToken(waffle.servlet.WindowsPrincipal identity, GrantedAuthorityFactory grantedAuthorityFactory, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority) Instantiates a new windows authentication token.- Parameters:
identity- TheWindowsPrincipalfor which this token exists.grantedAuthorityFactory- used to constructGrantedAuthoritys for each of the groups to which theWindowsPrincipalbelongsdefaultGrantedAuthority- if not null, thisGrantedAuthoritywill always be added to the granted authorities list
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthoritiesin interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentialsin interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetailsin interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipalin interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean authenticated) - Specified by:
setAuthenticatedin interfaceorg.springframework.security.core.Authentication
-
getName
-