Class Login

java.lang.Object
eu.webtoolkit.jwt.WObject
eu.webtoolkit.jwt.auth.Login

public class Login
extends WObject
A class that manages the current login state.

This is a model class which is typically associated with a single session, for the duration of the session.

Widgets that implement authentication (and thus produce authentication changes), will indicate their result in this object using the login() or logout() methods.

Widgets that want to react to login state changes (typically, as user logging in or out) should listen to the changed() signal of this object.

See Also:
AuthWidget
  • Nested Class Summary

    Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject

    WObject.FormData
  • Constructor Summary

    Constructors 
    Constructor Description
    Login()
    Default constructor.
  • Method Summary

    Modifier and Type Method Description
    Signal changed()
    Signal that indicates login changes.
    LoginState getState()
    Returns the current login state.
    User getUser()
    Returns the user currently identified.
    boolean isLoggedIn()
    Returns whether a user has successfully logged in.
    void login​(User user)
    Logs a user in.
    void login​(User user, LoginState state)
    Logs a user in.
    void logout()
    Logs the current user out.

    Methods inherited from class eu.webtoolkit.jwt.WObject

    getId, getObjectName, remove, setFormData, setObjectName, tr

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait