Class AbstractAuthentication<T extends Credentials>
- java.lang.Object
-
- io.streamthoughts.azkarra.http.security.auth.AbstractAuthentication<T>
-
- All Implemented Interfaces:
Authentication
- Direct Known Subclasses:
SSLClientAuthentication
,UsernamePasswordAuthentication
public abstract class AbstractAuthentication<T extends Credentials> extends Object implements Authentication
-
-
Constructor Summary
Constructors Constructor Description AbstractAuthentication(Principal principal, T credentials)
Creates a newAbstractAuthentication
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description T
getCredentials()
TheCredentials
of the user to authenticate.Principal
getPrincipal()
ThePrincipal
of the user to authenticate.boolean
isAuthenticated()
Checks whether the user has been authenticated successfully.void
setAuthenticated(boolean isAuthenticated)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.streamthoughts.azkarra.http.security.auth.Authentication
getUserDetails
-
-
-
-
Constructor Detail
-
AbstractAuthentication
public AbstractAuthentication(Principal principal, T credentials)
Creates a newAbstractAuthentication
instance.- Parameters:
principal
- thePrincipal
of the user to authenticate.credentials
- theCredentials
of the user to authenticate.
-
-
Method Detail
-
getCredentials
public T getCredentials()
TheCredentials
of the user to authenticate.- Specified by:
getCredentials
in interfaceAuthentication
- Returns:
- the
Credentials
.
-
getPrincipal
public Principal getPrincipal()
ThePrincipal
of the user to authenticate.- Specified by:
getPrincipal
in interfaceAuthentication
- Returns:
- the
Principal
.
-
isAuthenticated
public boolean isAuthenticated()
Checks whether the user has been authenticated successfully.- Specified by:
isAuthenticated
in interfaceAuthentication
- Returns:
true
if the user if authenticated,false
otherwise.
-
setAuthenticated
public void setAuthenticated(boolean isAuthenticated)
- Specified by:
setAuthenticated
in interfaceAuthentication
-
-