private boolean isTokenKerberos(AuthenticatedURL.Token token) throws AuthenticationException { if (token.isSet()) { AuthToken aToken = AuthToken.parse(token.toString()); if (aToken.getType().equals("kerberos") || aToken.getType().equals("kerberos-dt")) { return true; } } return false; }
private AuthenticationToken(AuthToken token) { super(token.getUserName(), token.getName(), token.getType()); setExpires(token.getExpires()); }
private AuthenticationToken(AuthToken token) { super(token.getUserName(), token.getName(), token.getType()); setMaxInactives(token.getMaxInactives()); setExpires(token.getExpires()); }
/** * Parses a string into an authentication token. * * @param tokenStr string representation of a token. * * @return the parsed authentication token. * * @throws AuthenticationException thrown if the string representation could not be parsed into * an authentication token. */ public static AuthenticationToken parse(String tokenStr) throws AuthenticationException { return new AuthenticationToken(AuthToken.parse(tokenStr)); }