public class PropertiesCasRealmDelegate extends Object implements CasRealm
CasRealm
implementation with users and roles defined by a properties
file with the following format:
username1=role1,role2,role3 username2=role1 username3=role2,role3User authentication succeeds if the name of the given principal exists as a username in the properties file.
Constructor and Description |
---|
PropertiesCasRealmDelegate() |
Modifier and Type | Method and Description |
---|---|
Principal |
authenticate(Principal p)
Authenticates the given principal.
|
String[] |
getRoles(Principal p)
Gets the roles defined for the given principal.
|
boolean |
hasRole(Principal principal,
String role)
Determines whether the given principal possesses the given role.
|
void |
readProperties() |
void |
setPropertiesFilePath(String path) |
public void setPropertiesFilePath(String path)
path
- Path to properties file container username/role data.public void readProperties()
public Principal authenticate(Principal p)
authenticate
in interface CasRealm
p
- Principal to authenticate.Copyright © 2006–2016 Jasig. All rights reserved.