public abstract class OntopolyAccessStrategy extends Object implements Serializable
OntopolyApplication
and
override the OntopolyApplication.newAccessStrategy()
method.Modifier and Type | Class and Description |
---|---|
static class |
OntopolyAccessStrategy.Privilege
The set of Privileges that a user can have.
|
Constructor and Description |
---|
OntopolyAccessStrategy() |
Modifier and Type | Method and Description |
---|---|
User |
authenticate(String username,
String password)
Attempts to authenticate a user with given name and password.
|
User |
autoAuthenticate(javax.servlet.http.HttpServletRequest request)
Automatically authenticates a user based on a request made.
|
OntopolyAccessStrategy.Privilege |
getPrivilege(User user,
FieldInstance fieldInstance)
Resolves the privilege of a user for the provided field.
|
OntopolyAccessStrategy.Privilege |
getPrivilege(User user,
Topic topic)
Resolves the privilege of a user for the provided topic.
|
String |
getSignInMessage()
Returns the message displayed on the login page.
|
boolean |
isEnabled()
Indicates if this strategy is enabled.
|
public boolean isEnabled()
public User autoAuthenticate(javax.servlet.http.HttpServletRequest request)
request
- The request made that requires automatic authentication
checkspublic User authenticate(String username, String password)
username
- The username to authenticatepassword
- The password in plain text used by the user attempting to
loginpublic OntopolyAccessStrategy.Privilege getPrivilege(User user, Topic topic)
user
- The user to retrieve the privilege fortopic
- The topic the user is trying to accesspublic OntopolyAccessStrategy.Privilege getPrivilege(User user, FieldInstance fieldInstance)
getPrivilege(User, Topic)
.user
- The user to retrieve the privilege forfieldInstance
- The fieldinstance the user is trying to accesspublic String getSignInMessage()