gov.nasa.pds.harvest.security
Class SecurityClient

java.lang.Object
  extended by gov.nasa.pds.harvest.security.SecurityClient

public class SecurityClient
extends Object

Class that provides an interface to the PDS Security Service

Author:
mcayanan

Constructor Summary
SecurityClient(String baseURL)
          Constructor
 
Method Summary
 String authenticate(String username, String password)
          Get a security token.
 boolean isTokenValid(String token)
          Determine if the given token is valid.
 void logout(String token)
          Logout the authenticated user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SecurityClient

public SecurityClient(String baseURL)
Constructor

Parameters:
baseURL - The security service url.
Method Detail

isTokenValid

public boolean isTokenValid(String token)
                     throws SecurityClientException
Determine if the given token is valid.

Parameters:
token - The security token.
Returns:
'true' if the token is valid.
Throws:
SecurityClientException - If an error occurred while interacting with the security service.

authenticate

public String authenticate(String username,
                           String password)
                    throws SecurityClientException
Get a security token.

Parameters:
username - The username.
password - The password.
Returns:
A security token.
Throws:
SecurityClientException - If an error occurred while interacting with the security service.

logout

public void logout(String token)
            throws SecurityClientException
Logout the authenticated user.

Parameters:
token - The security token.
Throws:
SecurityClientException - If an error occurred while interacting with the security service.


Copyright © 2010-2014 Planetary Data System. All Rights Reserved.