public interface Auth
| Modifier and Type | Method and Description |
|---|---|
static Auth |
create(java.lang.String token)
Creates authentication instance.
|
static Auth |
create(java.lang.String email,
java.lang.String password)
Creates authentication instance.
|
java.lang.String |
email()
Returns user email.
|
default boolean |
hasEmail()
Returns
true if email() is defined. |
default boolean |
hasId()
Returns
true if id() is defined. |
default boolean |
hasName()
Returns
true if name() is defined. |
default boolean |
hasPassword()
Returns
true if password() is defined. |
default boolean |
hasPhotoUrl()
Returns
true if photoUrl() is defined. |
default boolean |
hasScope(java.util.Collection<java.lang.String> scopes)
Returns
true if all of the scopes are defined. |
boolean |
hasScope(java.lang.String scope)
Returns
true if provided scope is defined. |
default boolean |
hasToken()
Returns
true if token() is defined. |
java.lang.String |
id()
Returns user id.
|
boolean |
isAuthenticated()
Is the user authenticated.
|
default boolean |
isMaster()
Checks if the user is master user.
|
static Auth |
master()
Creates master authentication instance.
|
java.lang.String |
name()
Returns a user name.
|
java.lang.String |
password()
Returns password.
|
java.lang.String |
photoUrl()
Returns photo URL.
|
java.lang.String |
token()
Returns authentication token.
|
static Auth create(java.lang.String token)
static Auth create(java.lang.String email, java.lang.String password)
static Auth master()
java.lang.String email()
default boolean hasEmail()
true if email() is defined.default boolean hasId()
true if id() is defined.default boolean hasName()
true if name() is defined.default boolean hasPassword()
true if password() is defined.default boolean hasPhotoUrl()
true if photoUrl() is defined.default boolean hasScope(java.util.Collection<java.lang.String> scopes)
true if all of the scopes are defined.boolean hasScope(java.lang.String scope)
true if provided scope is defined.default boolean hasToken()
true if token() is defined.java.lang.String id()
boolean isAuthenticated()
default boolean isMaster()
java.lang.String name()
java.lang.String password()
java.lang.String photoUrl()
java.lang.String token()