Class SpringSecurityPropertiesAuthorizationGenerator
- java.lang.Object
-
- org.pac4j.core.authorization.generator.SpringSecurityPropertiesAuthorizationGenerator
-
- All Implemented Interfaces:
AuthorizationGenerator
public class SpringSecurityPropertiesAuthorizationGenerator extends java.lang.Object implements AuthorizationGenerator
Authorization generator based on a properties file in Spring security format: username=password,grantedAuthority[,grantedAuthority][,enabled|disabled]- Since:
- 1.8.1
- Author:
- Jerome Leleu
-
-
Constructor Summary
Constructors Constructor Description SpringSecurityPropertiesAuthorizationGenerator(java.util.Properties properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Optional<UserProfile>
generate(WebContext context, SessionStore sessionStore, UserProfile profile)
Generate the authorization information from and for the user profile.
-
-
-
Field Detail
-
DISABLED
public static final java.lang.String DISABLED
- See Also:
- Constant Field Values
-
ENABLED
public static final java.lang.String ENABLED
- See Also:
- Constant Field Values
-
-
Method Detail
-
generate
public java.util.Optional<UserProfile> generate(WebContext context, SessionStore sessionStore, UserProfile profile)
Description copied from interface:AuthorizationGenerator
Generate the authorization information from and for the user profile.- Specified by:
generate
in interfaceAuthorizationGenerator
- Parameters:
context
- the web contextsessionStore
- the session storeprofile
- the user profile for which to generate the authorization information.- Returns:
- the updated profile or a new one (optional)
-
-