Errai 3.0.1-SNAPSHOT

org.jboss.errai.security.server
Class PicketLinkAuthenticationService

java.lang.Object
  extended by org.jboss.errai.security.server.PicketLinkAuthenticationService
All Implemented Interfaces:
AuthenticationService

@ApplicationScoped
public class PicketLinkAuthenticationService
extends Object
implements AuthenticationService

PicketLink version of the AuthenticationService and default implementation.

Author:
edewit@redhat.com

Constructor Summary
PicketLinkAuthenticationService()
           
 
Method Summary
 User getUser()
          Get the currently authenticated user.
 boolean isLoggedIn()
           
 User login(String username, String password)
          Login with the given username and password, throwing an exception if the login fails.
 void logout()
          Log out the currently authenticated user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PicketLinkAuthenticationService

public PicketLinkAuthenticationService()
Method Detail

login

public User login(String username,
                  String password)
Description copied from interface: AuthenticationService
Login with the given username and password, throwing an exception if the login fails.

Specified by:
login in interface AuthenticationService
Parameters:
username - The username to log in with.
password - The password to authenticate with.
Returns:
The logged in User.

isLoggedIn

public boolean isLoggedIn()
Specified by:
isLoggedIn in interface AuthenticationService
Returns:
True iff the user is currently logged in.

logout

public void logout()
Description copied from interface: AuthenticationService
Log out the currently authenticated user. Has no effect if there is no current user.

Specified by:
logout in interface AuthenticationService

getUser

public User getUser()
Description copied from interface: AuthenticationService
Get the currently authenticated user.

Specified by:
getUser in interface AuthenticationService
Returns:
The currently authenticated user. Never returns null. If no user is logged in, returns User.ANONYMOUS.

Errai 3.0.1-SNAPSHOT

Copyright © 2013-2014 JBoss, a division of Red Hat. All Rights Reserved.