|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectontopoly.OntopolyAccessStrategy
public abstract class OntopolyAccessStrategy
Default access strategy implementation used by OntopolyApplication.
Subclasses can extend this functionality to enable authentication and/or
authorization for their ontopoly instance. To activate your own
implementation, create an extension of OntopolyApplication and
override the OntopolyApplication.newAccessStrategy() method.
OntopolyApplication,
OntopolyApplication.newAccessStrategy(),
Serialized Form| Nested Class Summary | |
|---|---|
static class |
OntopolyAccessStrategy.Privilege
The set of Privileges that a user can have. |
| Constructor Summary | |
|---|---|
OntopolyAccessStrategy()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public OntopolyAccessStrategy()
| Method Detail |
|---|
public boolean isEnabled()
public User autoAuthenticate(javax.servlet.http.HttpServletRequest request)
request - The request made that requires automatic authentication
checks
public User authenticate(String username,
String password)
username - The username to authenticatepassword - The password in plain text used by the user attempting to
login
public OntopolyAccessStrategy.Privilege getPrivilege(User user,
Topic topic)
user - The user to retrieve the privilege fortopic - The topic the user is trying to access
public 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 access
public String getSignInMessage()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||