apache-kafka_0_9-lib/src/main/java/org/apache/kafka/common/security/kerberos/Login.java
private synchronized void reLogin() throws LoginException {
        if (!isKrbTicket) {
            return;
        }
        if (login == null) {
            throw new LoginException("Login must be done first");
        }
        if (!hasSufficientTimeElapsed()) {
            return;
        }
        log.info("Initiating logout for {}", principal);
        synchronized (Login.class) {
            // register most recent relogin attempt
            lastLogin = currentElapsedTime();
            //clear up the kerberos state. But the tokens are not cleared! As per
            //the Java kerberos login module code, only the kerberos credentials
            //are cleared
            login.logout();
            //login and also update the subject field of this instance to
            //have the new credentials (pass it to the LoginContext constructor)
            login = new LoginContext(loginContextName, subject);
            log.info("Initiating re-login for {}", principal);
            login.login();
        }
    }
private synchronized void reLogin() throws LoginException {
        if (!isKrbTicket) {
            return;
        }
        if (login == null) {
            throw new LoginException("Login must be done first");
        }
        if (!hasSufficientTimeElapsed()) {
            return;
        }
        log.info("Initiating logout for {}", principal);
        synchronized (Login.class) {
            // register most recent relogin attempt
            lastLogin = currentElapsedTime();
            //clear up the kerberos state. But the tokens are not cleared! As per
            //the Java kerberos login module code, only the kerberos credentials
            //are cleared
            login.logout();
            //login and also update the subject field of this instance to
            //have the new credentials (pass it to the LoginContext constructor)
            login = new LoginContext(loginContextName, subject);
            log.info("Initiating re-login for {}", principal);
            login.login();
        }
    }
private synchronized void reLogin ( ) throws LoginException { if ( ! isKrbTicket ) { return ; } if ( login == null ) { throw new LoginException ( "Login must be done first" ) ; } if ( ! hasSufficientTimeElapsed ( ) ) { return ; } log . info ( "Initiating logout for {}" , principal ) ; synchronized ( Login . class ) { // register most recent relogin attempt lastLogin = currentElapsedTime ( ) ; //clear up the kerberos state. But the tokens are not cleared! As per //the Java kerberos login module code, only the kerberos credentials //are cleared login . logout ( ) ; //login and also update the subject field of this instance to //have the new credentials (pass it to the LoginContext constructor) login = new LoginContext ( loginContextName , subject ) ; log . info ( "Initiating re-login for {}" , principal ) ; login . login ( ) ; } }
Re-login a principal. This method assumes that {@link #login(String)} has happened already.
@throws javax.security.auth.login.LoginException on a failure
Re - login a principal . This method assumes that {