/** * Return the Principal associated with the given certificate. */ protected Principal getPrincipal(X509Certificate usercert) { return(getPrincipal(usercert.getSubjectDN().getName())); }
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
/** * Return the Principal associated with the given user name. */ protected abstract Principal getPrincipal(String username);
protected Principal getPrincipal(String username, GSSCredential gssCredential) { Principal p = getPrincipal(username); if (p instanceof GenericPrincipal) { ((GenericPrincipal) p).setGssCredential(gssCredential); } return p; }
protected Principal getPrincipal(String username, GSSCredential gssCredential) { Principal p = getPrincipal(username); if (p instanceof GenericPrincipal) { ((GenericPrincipal) p).setGssCredential(gssCredential); } return p; }
protected Principal getPrincipal(String username, GSSCredential gssCredential) { Principal p = getPrincipal(username); if (p instanceof GenericPrincipal) { ((GenericPrincipal) p).setGssCredential(gssCredential); } return p; }
protected Principal getPrincipal(String username, GSSCredential gssCredential) { Principal p = getPrincipal(username); if (p instanceof GenericPrincipal) { ((GenericPrincipal) p).setGssCredential(gssCredential); } return p; }
protected Principal getPrincipal(String username, GSSCredential gssCredential) { Principal p = getPrincipal(username); if (p instanceof GenericPrincipal) { ((GenericPrincipal) p).setGssCredential(gssCredential); } return p; }
/** * Return the Principal associated with the specified username, if there * is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up */ @Override public Principal authenticate(String username) { if (username == null) { return null; } if (containerLog.isTraceEnabled()) { containerLog.trace(sm.getString("realmBase.authenticateSuccess", username)); } return getPrincipal(username); }
/** * Return the Principal associated with the specified username, if there * is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up */ @Override public Principal authenticate(String username) { if (username == null) { return null; } if (containerLog.isTraceEnabled()) { containerLog.trace(sm.getString("realmBase.authenticateSuccess", username)); } return getPrincipal(username); }
/** * Get the principal associated with the specified certificate. * @param usercert The user certificate * @return the Principal associated with the given certificate. */ protected Principal getPrincipal(X509Certificate usercert) { String username = x509UsernameRetriever.getUsername(usercert); if(log.isDebugEnabled()) log.debug(sm.getString("realmBase.gotX509Username", username)); return getPrincipal(username); }
/** * Return the Principal associated with the given certificate. */ protected Principal getPrincipal(X509Certificate usercert) { String username = x509UsernameRetriever.getUsername(usercert); if(log.isDebugEnabled()) log.debug(sm.getString("realmBase.gotX509Username", username)); return(getPrincipal(username)); }
/** * Get the principal associated with the specified certificate. * @param usercert The user certificate * @return the Principal associated with the given certificate. */ protected Principal getPrincipal(X509Certificate usercert) { String username = x509UsernameRetriever.getUsername(usercert); if(log.isDebugEnabled()) log.debug(sm.getString("realmBase.gotX509Username", username)); return getPrincipal(username); }
/** * Return the Principal associated with the given certificate. */ protected Principal getPrincipal(X509Certificate usercert) { String username = x509UsernameRetriever.getUsername(usercert); if(log.isDebugEnabled()) log.debug(sm.getString("realmBase.gotX509Username", username)); return(getPrincipal(username)); }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ public Principal authenticate(String username, char[] credentials) { char[] serverCredentials = getPassword(username); boolean validated ; if ( serverCredentials == null ) { validated = false; } else if(hasMessageDigest()) { validated = equalsIgnoreCase(serverCredentials, digest(credentials)); } else { validated = Arrays.equals(serverCredentials, credentials); } if(! validated ) { return null; } return getPrincipal(username); }
/** * Return the Principal associated with the specified username and * credentials, if there is one; otherwise return <code>null</code>. * * @param username Username of the Principal to look up * @param credentials Password or other credentials to use in * authenticating this username */ @Override public Principal authenticate(String username, String credentials) { String serverCredentials = getPassword(username); boolean validated = compareCredentials(credentials, serverCredentials); if (!validated) { if (containerLog.isTraceEnabled()) { containerLog.trace(sm.getString("realmBase.authenticateFailure", username)); } return null; } if (containerLog.isTraceEnabled()) { containerLog.trace(sm.getString("realmBase.authenticateSuccess", username)); } return getPrincipal(username); }