org.ldaptive.cli
Class AuthenticatorCli

java.lang.Object
  extended by org.ldaptive.cli.AbstractCli
      extended by org.ldaptive.cli.AuthenticatorCli

public class AuthenticatorCli
extends AbstractCli

Command line interface for Authenticator.

Version:
$Revision: 2885 $ $Date: 2014-02-05 16:28:49 -0500 (Wed, 05 Feb 2014) $
Author:
Middleware Services

Field Summary
 
Fields inherited from class org.ldaptive.cli.AbstractCli
OPT_HELP, OPT_PROVIDER_PROPERTIES, options, outputDsmlv1
 
Constructor Summary
AuthenticatorCli()
           
 
Method Summary
protected  int authenticate(Authenticator auth, AuthenticationRequest request)
          Executes the authentication operation.
protected  int dispatch(org.apache.commons.cli.CommandLine line)
          Dispatch command line data to the active that can perform the operation requested on the command line.
protected  String getCommandName()
          Returns the name of the command for which this class provides a CLI interface.
protected  AuthenticationRequest initAuthenticationRequest(org.apache.commons.cli.CommandLine line)
          Initialize an authentication request with command line options.
protected  Authenticator initAuthenticator(org.apache.commons.cli.CommandLine line)
          Initialize an Authenticator with command line options.
protected  void initOptions()
          Initialize CLI options.
static void main(String[] args)
          CLI entry point method.
 
Methods inherited from class org.ldaptive.cli.AbstractCli
getArgDesc, getPropertiesFromOptions, initConnectionFactory, performAction, printExamples, printHelp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatorCli

public AuthenticatorCli()
Method Detail

main

public static void main(String[] args)
CLI entry point method.

Parameters:
args - command line arguments.

initOptions

protected void initOptions()
Initialize CLI options.

Overrides:
initOptions in class AbstractCli

initAuthenticator

protected Authenticator initAuthenticator(org.apache.commons.cli.CommandLine line)
Initialize an Authenticator with command line options.

Parameters:
line - parsed command line arguments
Returns:
authenticator that has been initialized

initAuthenticationRequest

protected AuthenticationRequest initAuthenticationRequest(org.apache.commons.cli.CommandLine line)
Initialize an authentication request with command line options.

Parameters:
line - parsed command line arguments
Returns:
authentication request that has been initialized

dispatch

protected int dispatch(org.apache.commons.cli.CommandLine line)
                throws Exception
Dispatch command line data to the active that can perform the operation requested on the command line.

Specified by:
dispatch in class AbstractCli
Parameters:
line - parsed command line arguments
Returns:
status code
Throws:
Exception - on errors thrown by action

authenticate

protected int authenticate(Authenticator auth,
                           AuthenticationRequest request)
                    throws Exception
Executes the authentication operation.

Parameters:
auth - authenticator
request - authentication request
Returns:
status code
Throws:
Exception - on any LDAP error

getCommandName

protected String getCommandName()
Returns the name of the command for which this class provides a CLI interface.

Specified by:
getCommandName in class AbstractCli
Returns:
name of CLI command


Copyright © 2003-2017 Virginia Tech. All Rights Reserved.