2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Copyright (c) 2009 Sun Microsystems Inc. All Rights Reserved
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * The contents of this file are subject to the terms
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * of the Common Development and Distribution License
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * (the License). You may not use this file except in
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * compliance with the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * You can obtain a copy of the License at
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * https://opensso.dev.java.net/public/CDDLv1.0.html or
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * See the License for the specific language governing
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * permission and limitations under the License.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * When distributing Covered Code, include this CDDL
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Header Notice in each file and include the License file
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * If applicable, add the following below the CDDL Header,
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * with the fields enclosed by brackets [] replaced by
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * your own identifying information:
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * "Portions Copyrighted [year] [name of copyright owner]"
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * $Id: HOTPPrincipal.java,v 1.1 2009/03/24 23:52:12 pluo Exp $
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Portions Copyrighted [2011] [ForgeRock AS]
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterpackage com.sun.identity.authentication.modules.hotp;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Fosterpublic class HOTPPrincipal implements Principal, java.io.Serializable {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Public constructor that takes user name
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster throw new NullPointerException("illegal null input");
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns the HOTP username for this <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return the HOTP username for this <code>HOTPPrincipal</code>
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns a string representation of this <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return a string representation of this <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Compares the specified Object with this <code>HOTPPrincipal</code>
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * for equality. Returns true if the given object is also a
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>HOTPPrincipal</code> and the two HOTPPrincipals
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * have the same username.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @param o Object to be compared for equality with this
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return true if the specified Object is equal equal to this
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return false;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster if (this == o) {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return true;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster if (!(o instanceof HOTPPrincipal)) {
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return false;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return true;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster return false;
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * Returns a hash code for this <code>HOTPPrincipal</code>.
2d0a88b18a041738cfe635b45bd1db56af469c91Allan Foster * @return a hash code for this <code>HOTPPrincipal</code>.