Package waffle.spring

Class FqnGrantedAuthorityFactory

java.lang.Object
waffle.spring.FqnGrantedAuthorityFactory
All Implemented Interfaces:
GrantedAuthorityFactory

public class FqnGrantedAuthorityFactory extends Object implements 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 Details

    • FqnGrantedAuthorityFactory

      public FqnGrantedAuthorityFactory(String newPrefix, boolean newConvertToUpperCase)
      Instantiates a new fqn granted authority factory.
      Parameters:
      newPrefix - the new prefix
      newConvertToUpperCase - the new convert to upper case
  • Method Details

    • createGrantedAuthority

      public org.springframework.security.core.GrantedAuthority createGrantedAuthority(waffle.windows.auth.WindowsAccount windowsAccount)
      Description copied from interface: GrantedAuthorityFactory
      Creates a GrantedAuthority from the given WindowsAccount.
      Specified by:
      createGrantedAuthority in interface GrantedAuthorityFactory
      Parameters:
      windowsAccount - the windows account
      Returns:
      the granted authority