package ident0;
import org.jboss.security.auth.spi.DatabaseServerLoginModule;

import javax.naming.NamingException;

import javax.security.auth.Subject;

import javax.security.auth.callback.CallbackHandler;

import javax.security.auth.login.LoginException;

import javax.transaction.TransactionManager;

import java.io.InputStream;

import java.security.Principal;

import java.security.acl.Group;

import java.util.Map;

import java.util.Set;

 

public class ManagementRealmLoginModule extends DatabaseServerLoginModule {

   // private static final Logger LOGGER = LoggerFactory.getLogger(ApplicationRealmLoginModule.class);

 

    public ManagementRealmLoginModule() {

        System.out.println("ManagementRealmLoginModule");

    }

 

    @Override

    public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) {

        System.out.println("initialize");

        super.initialize(subject, callbackHandler, sharedState, options);

    }

    @Override

    protected TransactionManager getTransactionManager() throws NamingException {

        return super.getTransactionManager();

    }

 

    @Override

    protected String getUsername() {

        System.out.println("getUsersPassword");
        org.jboss.security.auth.spi.UsersRolesLoginModule j;
        return super.getUsername();

    }

 

    @Override

    protected String getUsersPassword() throws LoginException {

        System.out.println("getUsersPassword");

        return super.getUsersPassword();

    }

 

    @Override

    protected Group[] getRoleSets() throws LoginException {

        System.out.println("getRoleSets");

        return super.getRoleSets();

    }

 

    @Override

    protected String convertRawPassword(String rawPassword) {

        System.out.println("convertRawPassword");

        return super.convertRawPassword(rawPassword);

    }

 

    @Override

    public boolean login() throws LoginException {

        System.out.println("login");

        return super.login();

    }

 

    @Override

    protected Principal getIdentity() {

        System.out.println("getIdentity");

        return super.getIdentity();

    }

 

    @Override

    protected Principal getUnauthenticatedIdentity() {

        System.out.println("getUnauthenticatedIdentity");

        return super.getUnauthenticatedIdentity();

    }

 

    @Override

    protected Object getCredentials() {

        System.out.println("getCredentials");

        return super.getCredentials();

    }

 

    @Override

    protected String[] getUsernameAndPassword() throws LoginException {

        System.out.println("getUsernameAndPassword");

        return super.getUsernameAndPassword();

    }

 

    @Override

    protected String createPasswordHash(String username, String password, String digestOption) throws LoginException {

        System.out.println("createPasswordHash");

        return super.createPasswordHash(username, password, digestOption);

    }

 

    @Override

    protected Throwable getValidateError() {

        System.out.println("getValidateError");

        return super.getValidateError();

    }

 

    @Override

    protected void setValidateError(Throwable validateError) {

        System.out.println("setValidateError");

        super.setValidateError(validateError);

    }

 

    @Override

    protected boolean validatePassword(String inputPassword, String expectedPassword) {

        System.out.println("validatePassword");

        return super.validatePassword(inputPassword, expectedPassword);

    }

 

    @Override

    protected void safeClose(InputStream fis) {

        System.out.println("safeClose");

        super.safeClose(fis);

    }

 

    @Override

    public boolean commit() throws LoginException {

        System.out.println("commit");

        return super.commit();

    }

 

    @Override

    public boolean abort() throws LoginException {

        System.out.println("abort");

        return super.abort();

    }

 

    @Override

    public boolean logout() throws LoginException {

        System.out.println("logout");

        return super.logout();

    }

 

    @Override

    protected boolean getUseFirstPass() {

        System.out.println("getUseFirstPass");

        return super.getUseFirstPass();

    }

 

    @Override

    protected Group createGroup(String name, Set<Principal> principals) {

        System.out.println("createGroup");

        return super.createGroup(name, principals);

    }

 

    @Override

    protected Principal createIdentity(String username) throws Exception {

        System.out.println("createIdentity");

        return super.createIdentity(username);

    }

 

    @Override

    protected Group getCallerPrincipalGroup(Set<Principal> principals) {

        System.out.println("getCallerPrincipalGroup");

        return super.getCallerPrincipalGroup(principals);

    }
}