public interface UserService
Modifier and Type | Method and Description |
---|---|
java.lang.String |
createLoginURL(java.lang.String destinationURL)
Returns a 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 a 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,
java.lang.String federatedIdentity,
java.util.Set<java.lang.String> attributesRequest)
Deprecated.
Use of federatedIdentity is no longer supported. Please change calls to a method
that does not take the parameter.
|
java.lang.String |
createLogoutURL(java.lang.String destinationURL)
Returns a 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 a URL that can be used to log the current user out of this app.
|
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.
|
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
- not used.java.lang.IllegalArgumentException
- If the destinationURL is not valid.@Deprecated java.lang.String createLoginURL(java.lang.String destinationURL, java.lang.String authDomain, java.lang.String federatedIdentity, java.util.Set<java.lang.String> attributesRequest)
destinationURL
- where the user will be redirected after they log in.authDomain
- not used.federatedIdentity
- Setting this parameter to a non-null value will throw an
IllegalArgumentException. OpenID 2.0 support has been decommissioned. Please see
https://cloud.google.com/appengine/docs/deprecations/open_id for details.attributesRequest
- not used.java.lang.IllegalArgumentException
- If the destinationURL is not valid or if federatedIdentity is
not nulljava.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
- not used.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.