Class UserLoginModule

java.lang.Object
bitel.billing.server.admin.bgsecure.bean.UserLoginModule
All Implemented Interfaces:
javax.security.auth.spi.LoginModule
Direct Known Subclasses:
UserLoginModule.WithoutPassword

public class UserLoginModule
extends java.lang.Object
implements javax.security.auth.spi.LoginModule
  • Nested Class Summary

    Nested Classes
    Modifier and Type Class Description
    class  UserLoginModule.ConnectionCallback  
    class  UserLoginModule.UserPrincipal  
    static class  UserLoginModule.WithoutPassword  
  • Field Summary

    Fields
    Modifier and Type Field Description
    protected javax.security.auth.callback.CallbackHandler callbackHandler  
    protected boolean loginOK  
    protected java.util.Map<java.lang.String,​?> options  
    protected java.util.Map<java.lang.String,​?> sharedState  
    protected javax.security.auth.Subject subject  
    protected UserLoginModule.UserPrincipal user  
  • Constructor Summary

    Constructors
    Constructor Description
    UserLoginModule()  
  • Method Summary

    Modifier and Type Method Description
    boolean abort()  
    static javax.security.auth.Subject auth​(java.lang.String loginContextName, java.lang.String userName, java.lang.String userPswd)
    аутентификация. используется slave-коннекшен.
    boolean commit()  
    static User getUser​(javax.security.auth.Subject subject)  
    void initialize​(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,​?> sharedState, java.util.Map<java.lang.String,​?> options)  
    boolean login()  
    protected void login​(User user, javax.security.auth.callback.NameCallback name, javax.security.auth.callback.PasswordCallback pswd)  
    boolean logout()  

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • subject

      protected javax.security.auth.Subject subject
    • callbackHandler

      protected javax.security.auth.callback.CallbackHandler callbackHandler
    • sharedState

      protected java.util.Map<java.lang.String,​?> sharedState
    • options

      protected java.util.Map<java.lang.String,​?> options
    • user

    • loginOK

      protected boolean loginOK
  • Constructor Details

    • UserLoginModule

      public UserLoginModule()
  • Method Details

    • auth

      public static final javax.security.auth.Subject auth​(java.lang.String loginContextName, java.lang.String userName, java.lang.String userPswd) throws javax.security.auth.login.LoginException
      аутентификация. используется slave-коннекшен.
      Throws:
      javax.security.auth.login.LoginException - не получилось
    • getUser

      public static final User getUser​(javax.security.auth.Subject subject)
    • initialize

      public void initialize​(javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler callbackHandler, java.util.Map<java.lang.String,​?> sharedState, java.util.Map<java.lang.String,​?> options)
      Specified by:
      initialize in interface javax.security.auth.spi.LoginModule
    • login

      protected void login​(User user, javax.security.auth.callback.NameCallback name, javax.security.auth.callback.PasswordCallback pswd) throws javax.security.auth.login.LoginException
      Throws:
      javax.security.auth.login.LoginException
    • login

      public boolean login() throws javax.security.auth.login.LoginException
      Specified by:
      login in interface javax.security.auth.spi.LoginModule
      Throws:
      javax.security.auth.login.LoginException
    • commit

      public boolean commit() throws javax.security.auth.login.LoginException
      Specified by:
      commit in interface javax.security.auth.spi.LoginModule
      Throws:
      javax.security.auth.login.LoginException
    • abort

      public boolean abort() throws javax.security.auth.login.LoginException
      Specified by:
      abort in interface javax.security.auth.spi.LoginModule
      Throws:
      javax.security.auth.login.LoginException
    • logout

      public boolean logout() throws javax.security.auth.login.LoginException
      Specified by:
      logout in interface javax.security.auth.spi.LoginModule
      Throws:
      javax.security.auth.login.LoginException