|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Identity
Represents the identity of the current user, and provides an API for authentication and authorization.
| Nested Class Summary | |
|---|---|
static class |
Identity.AuthenticationResult
|
| Method Summary | |
|---|---|
org.jboss.picketlink.idm.model.User |
getUser()
|
boolean |
hasPermission(Class<?> resourceClass,
Serializable identifier,
String operation)
As above, however this method should be used when a reference to the resource is not available, or is expensive to retrieve, for example looking up an entity from a relational database. |
boolean |
hasPermission(Object resource,
String operation)
Tests if the currently authenticated user has permission to perform the specified operation on the specified resource. |
boolean |
isLoggedIn()
Simple check that returns true if the user is logged in, without attempting to authenticate |
Identity.AuthenticationResult |
login()
Attempts to authenticate the user. |
void |
logout()
Logs out the currently authenticated user |
| Method Detail |
|---|
boolean isLoggedIn()
org.jboss.picketlink.idm.model.User getUser()
Identity.AuthenticationResult login()
org.apache.deltaspike.security.api.authentication.event.LoggedInEvent
- raised when authentication is successful
org.apache.deltaspike.security.api.authentication.event.LoginFailedEvent
- raised when authentication fails
org.apache.deltaspike.security.api.authentication.event.AlreadyLoggedInEvent
- raised if the user is already authenticated
void logout()
boolean hasPermission(Object resource,
String operation)
resource - The resource for which the permission is requiredoperation - The operation that the user wishes to perform on the resource
boolean hasPermission(Class<?> resourceClass,
Serializable identifier,
String operation)
resourceClass - The class of the resourceidentifier - The identifier of the resource, for example may be a primary key value if an entityoperation - The operation that the user wishes to perform on the resource
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||