Class 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.

    • 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:
        login in interface org.jboss.errai.security.shared.service.AuthenticationService
      • logout

        public void logout()
        Specified by:
        logout in interface org.jboss.errai.security.shared.service.AuthenticationService
      • getUser

        public org.jboss.errai.security.shared.api.identity.User getUser()
        Specified by:
        getUser in interface org.jboss.errai.security.shared.service.AuthenticationService
      • isLoggedIn

        public boolean isLoggedIn()
        Specified by:
        isLoggedIn in interface org.jboss.errai.security.shared.service.AuthenticationService