@ApplicationScoped @Alternative public class JAASAuthenticationService extends GroupAdapterAuthorizationSource implements org.jboss.errai.security.shared.service.AuthenticationService
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.
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_DOMAIN |
Constructor and Description |
---|
JAASAuthenticationService(String domain) |
Modifier and Type | Method and Description |
---|---|
org.jboss.errai.security.shared.api.identity.User |
getUser() |
boolean |
isLoggedIn() |
org.jboss.errai.security.shared.api.identity.User |
login(String username,
String password) |
void |
logout() |
collectEntitiesFromAdapters, collectEntitiesFromSubject, getGroups, getRoles, loadEntitiesFromSubjectAndAdapters
public static final String DEFAULT_DOMAIN
public JAASAuthenticationService(String domain)
public org.jboss.errai.security.shared.api.identity.User login(String username, String password)
login
in interface org.jboss.errai.security.shared.service.AuthenticationService
public void logout()
logout
in interface org.jboss.errai.security.shared.service.AuthenticationService
public org.jboss.errai.security.shared.api.identity.User getUser()
getUser
in interface org.jboss.errai.security.shared.service.AuthenticationService
public boolean isLoggedIn()
isLoggedIn
in interface org.jboss.errai.security.shared.service.AuthenticationService
Copyright © 2012–2020 JBoss by Red Hat. All rights reserved.