public void setValue(Properties properties) { String value; if((value = properties.getProperty(CLIENT_PRINCIPAL_NAME)) != null){ this.client_principal_name= value; properties.remove(CLIENT_PRINCIPAL_NAME); } if((value = properties.getProperty(CLIENT_PASSWORD)) != null){ this.client_password= value; properties.remove(CLIENT_PASSWORD); } if((value = properties.getProperty(SERVICE_PRINCIPAL_NAME)) != null){ this.service_principal_name= value; properties.remove(SERVICE_PRINCIPAL_NAME); } try { authenticateClientPrincipal(); } catch (Exception e) { // If we get any kind of exception then blank the subject log.warn("Krb5Token failed to authenticate", e); subject = null; } }
public void writeTo(DataOutput out) throws IOException { if (isAuthenticated()) { generateServiceTicket(); writeServiceTicketToSream(out); } }
public void readFrom(DataInput in) throws IOException, IllegalAccessException, InstantiationException { // This method is called from within a temporary token so it has not authenticated to a client principal // This token is passed to the authenticate readRemoteServiceTicketFromStream(in); }
public boolean authenticate(AuthToken token, Message msg) { if (!isAuthenticated()) { log.error(Util.getMessage("Krb5TokenFailedToSetupCorrectlyCannotAuthenticateAnyPeers")); return false; validateRemoteServiceTicket(remoteToken); return true;
public boolean authenticate(AuthToken token, Message msg) { if (!isAuthenticated()) { log.error(Util.getMessage("Krb5TokenFailedToSetupCorrectlyCannotAuthenticateAnyPeers")); return false; validateRemoteServiceTicket(remoteToken); return true;
public void writeTo(DataOutput out) throws IOException { if (isAuthenticated()) { generateServiceTicket(); writeServiceTicketToSream(out); } }
public void readFrom(DataInput in) throws IOException, IllegalAccessException, InstantiationException { // This method is called from within a temporary token so it has not authenticated to a client principal // This token is passed to the authenticate readRemoteServiceTicketFromStream(in); }
public void setValue(Properties properties) { String value; if((value = properties.getProperty(CLIENT_PRINCIPAL_NAME)) != null){ this.client_principal_name= value; properties.remove(CLIENT_PRINCIPAL_NAME); } if((value = properties.getProperty(CLIENT_PASSWORD)) != null){ this.client_password= value; properties.remove(CLIENT_PASSWORD); } if((value = properties.getProperty(SERVICE_PRINCIPAL_NAME)) != null){ this.service_principal_name= value; properties.remove(SERVICE_PRINCIPAL_NAME); } try { authenticateClientPrincipal(); } catch (Exception e) { // If we get any kind of exception then blank the subject log.warn("Krb5Token failed to authenticate", e); subject = null; } }