public class FromAttributesAuthorizationGenerator<U extends CommonProfile> extends Object implements AuthorizationGenerator<U>
Generate the authorization information by inspecting attributes.
The attributes containing the roles separated by the splitChar property (can be set through setSplitChar(String)) are
defined in the constructor. It's the same for the attributes containing the permissions.
| Constructor and Description |
|---|
FromAttributesAuthorizationGenerator(Collection<String> roleAttributes,
Collection<String> permissionAttributes) |
FromAttributesAuthorizationGenerator(String[] roleAttributes,
String[] permissionAttributes) |
| Modifier and Type | Method and Description |
|---|---|
U |
generate(WebContext context,
U profile)
Generate the authorization information from and for the user profile.
|
String |
getSplitChar() |
void |
setSplitChar(String splitChar) |
public FromAttributesAuthorizationGenerator(Collection<String> roleAttributes, Collection<String> permissionAttributes)
public U generate(WebContext context, U profile)
AuthorizationGeneratorgenerate in interface AuthorizationGenerator<U extends CommonProfile>context - the web contextprofile - the user profile for which to generate the authorization information.public String getSplitChar()
public void setSplitChar(String splitChar)
Copyright © 2017. All Rights Reserved.