Package waffle.spring
Class FqnGrantedAuthorityFactory
java.lang.Object
waffle.spring.FqnGrantedAuthorityFactory
- All Implemented Interfaces:
GrantedAuthorityFactory
A
GrantedAuthorityFactory
that uses the WindowsAccount
's fqn as the basis of the
GrantedAuthority
string, and (optionally) applies two transformations:
- prepending a prefix, and
- converting to uppercase
-
Constructor Summary
ConstructorDescriptionFqnGrantedAuthorityFactory
(String newPrefix, boolean newConvertToUpperCase) Instantiates a new fqn granted authority factory. -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.core.GrantedAuthority
createGrantedAuthority
(WindowsAccount windowsAccount) Creates aGrantedAuthority
from the givenWindowsAccount
.
-
Constructor Details
-
FqnGrantedAuthorityFactory
Instantiates a new fqn granted authority factory.- Parameters:
newPrefix
- the new prefixnewConvertToUpperCase
- the new convert to upper case
-
-
Method Details
-
createGrantedAuthority
public org.springframework.security.core.GrantedAuthority createGrantedAuthority(WindowsAccount windowsAccount) Description copied from interface:GrantedAuthorityFactory
Creates aGrantedAuthority
from the givenWindowsAccount
.- Specified by:
createGrantedAuthority
in interfaceGrantedAuthorityFactory
- Parameters:
windowsAccount
- the windows account- Returns:
- the granted authority
-