Class JAASAuthenticationService
- java.lang.Object
-
- org.uberfire.backend.server.security.adapter.GroupAdapterAuthorizationSource
-
- org.uberfire.backend.server.security.JAASAuthenticationService
-
- All Implemented Interfaces:
org.jboss.errai.security.shared.service.AuthenticationService
@ApplicationScoped @Alternative public class JAASAuthenticationService extends GroupAdapterAuthorizationSource implements org.jboss.errai.security.shared.service.AuthenticationService
Implements stateful, thread-local authentication of a user via the JAAS API (javax.security.auth.login.LoginContext).Do not use this module for authenticating web requests! Upon login, it associates the current thread with the authenticated user. This association is only undone upon a call to
logout(). This is appropriate for use with the Git SSH daemon, but would cause serious security issues if used for authenticating HTTP requests.
-
-
Field Summary
Fields Modifier and Type Field Description static StringDEFAULT_DOMAIN
-
Constructor Summary
Constructors Constructor Description JAASAuthenticationService(String domain)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.jboss.errai.security.shared.api.identity.UsergetUser()booleanisLoggedIn()org.jboss.errai.security.shared.api.identity.Userlogin(String username, String password)voidlogout()-
Methods inherited from class org.uberfire.backend.server.security.adapter.GroupAdapterAuthorizationSource
collectEntitiesFromAdapters, collectEntitiesFromSubject, getGroups, getRoles, loadEntitiesFromSubjectAndAdapters
-
-
-
-
Field Detail
-
DEFAULT_DOMAIN
public static final String DEFAULT_DOMAIN
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JAASAuthenticationService
public JAASAuthenticationService(String domain)
-
-
Method Detail
-
login
public org.jboss.errai.security.shared.api.identity.User login(String username, String password)
- Specified by:
loginin interfaceorg.jboss.errai.security.shared.service.AuthenticationService
-
logout
public void logout()
- Specified by:
logoutin interfaceorg.jboss.errai.security.shared.service.AuthenticationService
-
getUser
public org.jboss.errai.security.shared.api.identity.User getUser()
- Specified by:
getUserin interfaceorg.jboss.errai.security.shared.service.AuthenticationService
-
isLoggedIn
public boolean isLoggedIn()
- Specified by:
isLoggedInin interfaceorg.jboss.errai.security.shared.service.AuthenticationService
-
-