Package waffle.spring
Class WindowsAuthenticationToken
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
Modifier and TypeFieldDescriptionstatic final org.springframework.security.core.GrantedAuthority
TheGrantedAuthority
that will be added to every WindowsAuthenticationToken, unless another (or null) is specified.static final GrantedAuthorityFactory
TheGrantedAuthorityFactory
that is used by default if a custom one is not specified. -
Constructor Summary
ConstructorDescriptionWindowsAuthenticationToken
(WindowsPrincipal identity) Convenience constructor that callsWindowsAuthenticationToken(WindowsPrincipal, GrantedAuthorityFactory, GrantedAuthority)
with: the given identity, theDEFAULT_GRANTED_AUTHORITY_FACTORY
theDEFAULT_GRANTED_AUTHORITY
.WindowsAuthenticationToken
(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()
boolean
void
setAuthenticated
(boolean authenticated)
-
Field Details
-
DEFAULT_GRANTED_AUTHORITY_FACTORY
TheGrantedAuthorityFactory
that is used by default if a custom one is not specified. This defaultGrantedAuthorityFactory
is aFqnGrantedAuthorityFactory
with prefix"ROLE_"
and will convert the fqn to uppercase -
DEFAULT_GRANTED_AUTHORITY
public static final org.springframework.security.core.GrantedAuthority DEFAULT_GRANTED_AUTHORITYTheGrantedAuthority
that will be added to every WindowsAuthenticationToken, unless another (or null) is specified.
-
-
Constructor Details
-
WindowsAuthenticationToken
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(WindowsPrincipal identity, GrantedAuthorityFactory grantedAuthorityFactory, org.springframework.security.core.GrantedAuthority defaultGrantedAuthority) Instantiates a new windows authentication token.- Parameters:
identity
- TheWindowsPrincipal
for which this token exists.grantedAuthorityFactory
- used to constructGrantedAuthority
s for each of the groups to which theWindowsPrincipal
belongsdefaultGrantedAuthority
- if not null, thisGrantedAuthority
will always be added to the granted authorities list
-
-
Method Details
-
getAuthorities
- Specified by:
getAuthorities
in interfaceorg.springframework.security.core.Authentication
-
getCredentials
- Specified by:
getCredentials
in interfaceorg.springframework.security.core.Authentication
-
getDetails
- Specified by:
getDetails
in interfaceorg.springframework.security.core.Authentication
-
getPrincipal
- Specified by:
getPrincipal
in interfaceorg.springframework.security.core.Authentication
-
isAuthenticated
public boolean isAuthenticated()- Specified by:
isAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
setAuthenticated
public void setAuthenticated(boolean authenticated) - Specified by:
setAuthenticated
in interfaceorg.springframework.security.core.Authentication
-
getName
-