Class AuthenticationManager
- java.lang.Object
-
- org.opendaylight.aaa.tokenauthrealm.auth.AuthenticationManager
-
- All Implemented Interfaces:
AuthenticationService
@Singleton public final class AuthenticationManager extends Object implements AuthenticationService
AnInheritableThreadLocal
-basedAuthenticationService
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
AuthenticationManager.Configuration
-
Constructor Summary
Constructors Constructor Description AuthenticationManager()
AuthenticationManager(boolean authEnabled)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the current security context.Authentication
get()
Retrieve the current security context, or null if none exists.boolean
isAuthEnabled()
Checks to see if authentication is enabled.void
set(Authentication authentication)
Set the current security context.void
setAuthEnabled(boolean authEnabled)
-
-
-
Method Detail
-
setAuthEnabled
public void setAuthEnabled(boolean authEnabled)
-
get
public Authentication get()
Description copied from interface:AuthenticationService
Retrieve the current security context, or null if none exists.- Specified by:
get
in interfaceAuthenticationService
- Returns:
- security context
-
set
public void set(Authentication authentication)
Description copied from interface:AuthenticationService
Set the current security context. OnlyTokenAuth
should set security context based on the authentication result.- Specified by:
set
in interfaceAuthenticationService
- Parameters:
authentication
- security context
-
clear
public void clear()
Description copied from interface:AuthenticationService
Clear the current security context.- Specified by:
clear
in interfaceAuthenticationService
-
isAuthEnabled
public boolean isAuthEnabled()
Description copied from interface:AuthenticationService
Checks to see if authentication is enabled.- Specified by:
isAuthEnabled
in interfaceAuthenticationService
- Returns:
- true if it is, false otherwise
-
-