Coverage Report - org.semispace.ws.TokenAuthenticator
 
Classes in this File Line Coverage Branch Coverage Complexity
TokenAuthenticator
N/A
N/A
1
 
 1  
 /*
 2  
  * ============================================================================
 3  
  *
 4  
  *  File:     TokenAuthenticator.java
 5  
  *----------------------------------------------------------------------------
 6  
  *
 7  
  * Copyright 2008 Erlend Nossum
 8  
  *
 9  
  * Licensed under the Apache License, Version 2.0 (the "License"); 
 10  
  * you may not use this file except in compliance with the License. 
 11  
  * You may obtain a copy of the License at 
 12  
  *
 13  
  *   http://www.apache.org/licenses/LICENSE-2.0
 14  
  *
 15  
  * Unless required by applicable law or agreed to in writing, software
 16  
  * distributed under the License is distributed on an "AS IS" BASIS,
 17  
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 18  
  * See the License for the specific language governing permissions and 
 19  
  * limitations under the License.
 20  
  *
 21  
  *  Description:  See javadoc below
 22  
  *
 23  
  *  Created:      Mar 16, 2008
 24  
  * ============================================================================ 
 25  
  */
 26  
 
 27  
 package org.semispace.ws;
 28  
 
 29  
 /**
 30  
  * Authenticator for token login.
 31  
  */
 32  
 public interface TokenAuthenticator {
 33  
     /**
 34  
      * Generate a token based on the username / password. This
 35  
      * will typically be performed as query on a member 
 36  
      * database, or as a question upon the space.
 37  
      */
 38  
     public String authenticate( String username, String password);
 39  
     
 40  
     /**
 41  
      * @return True if the token is valid, false otherwise
 42  
      */
 43  
     public boolean isTokenValid( String token );
 44  
 }