|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UserService
The UserService provides information useful for forcing a user to log in or out, and retrieving information about the user who is currently logged-in.
Method Summary | |
---|---|
java.lang.String |
createFederatedLoginURL(java.lang.String federatedIdentity,
java.lang.String destinationURL,
java.lang.String authority,
java.util.Set<java.lang.String> attributesRequest)
Returns an URL that can be used to redirect the user to for third party login for federated login the user. |
java.lang.String |
createFederatedLogoutURL(java.lang.String destinationURL)
Returns an URL that can be used to log the current user out of this app. |
java.lang.String |
createLoginURL(java.lang.String destinationURL)
Returns an URL that can be used to display a login page to the user. |
java.lang.String |
createLoginURL(java.lang.String destinationURL,
java.lang.String authDomain)
Returns an URL that can be used to display a login page to the user. |
java.lang.String |
createLogoutURL(java.lang.String destinationURL)
Returns an URL that can be used to log the current user out of this app. |
java.lang.String |
createLogoutURL(java.lang.String destinationURL,
java.lang.String authDomain)
Returns an URL that can be used to log the current user out of this app. |
FederatedLoginUser |
getCurrentFederatedUser()
If the user is logged in, this method will return a FederatedLoginUser that contains information about them. |
User |
getCurrentUser()
If the user is logged in, this method will return a User that
contains information about them. |
boolean |
isUserAdmin()
Returns true if the user making this request is an admin for this application, false otherwise. |
boolean |
isUserLoggedIn()
Returns true if there is a user logged in, false otherwise. |
Method Detail |
---|
java.lang.String createLoginURL(java.lang.String destinationURL)
destinationURL
- where the user will be redirected after
they log in.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.java.lang.String createLoginURL(java.lang.String destinationURL, java.lang.String authDomain)
destinationURL
- where the user will be redirected after
they log in.authDomain
- authentication domain to use.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.java.lang.String createFederatedLoginURL(java.lang.String federatedIdentity, java.lang.String destinationURL, java.lang.String authority, java.util.Set<java.lang.String> attributesRequest)
federatedIdentity
- federated identity string which is to be asserted.destinationURL
- where the user will be redirected after
they log in.authority
- the authority that will authenticate the federated user.attributesRequest
- additional attributions requested for this login,
IDP may not may not support these attributes.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.java.lang.String createFederatedLogoutURL(java.lang.String destinationURL)
destinationURL
- where the user will be redirected after
they logout.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.java.lang.String createLogoutURL(java.lang.String destinationURL)
destinationURL
- where the user will be redirected after
they log out.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.java.lang.String createLogoutURL(java.lang.String destinationURL, java.lang.String authDomain)
destinationURL
- where the user will be redirected after
they log out.authDomain
- authentication domain to use.
java.lang.IllegalArgumentException
- If the destinationURL is not valid.boolean isUserLoggedIn()
boolean isUserAdmin()
java.lang.IllegalStateException
- If the current user is not logged in.User getCurrentUser()
User
that
contains information about them.
Note that repeated calls may not necessarily return the same
User
object.
FederatedLoginUser getCurrentFederatedUser()
FederatedLoginUser
that contains information about them.
Note that repeated calls may not necessarily return the same
User
object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |