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() |
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 |
setPermissionAttributes(String permissionAttributesStr) |
void |
setRoleAttributes(String roleAttributesStr) |
void |
setSplitChar(String splitChar) |
public FromAttributesAuthorizationGenerator()
public FromAttributesAuthorizationGenerator(Collection<String> roleAttributes, Collection<String> permissionAttributes)
public U generate(WebContext context, U profile)
AuthorizationGenerator
generate
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)
public void setRoleAttributes(String roleAttributesStr)
public void setPermissionAttributes(String permissionAttributesStr)
Copyright © 2018. All rights reserved.