jboss-sasl 1.0.0.Beta1

org.jboss.sasl.callback
Class PublicKeyCallback

java.lang.Object
  extended by org.jboss.sasl.callback.PublicKeyCallback
All Implemented Interfaces:
Callback

public final class PublicKeyCallback
extends Object
implements Callback

Callback to retrieve or provide a public key during authentication.

Author:
David M. Lloyd

Constructor Summary
PublicKeyCallback(String prompt, PublicKey publicKey, String[] algorithmNames)
          Construct a new instance.
PublicKeyCallback(String prompt, String[] algorithmNames)
          Construct a new instance.
 
Method Summary
 boolean allows(String name)
          Convenience method to determine whether an algorithm name is allowed.
 String[] getAlgorithmNames()
          Get the acceptable algorithm names.
 String getPrompt()
          Get the prompt string.
 PublicKey getPublicKey()
          Get the public key.
 void setPublicKey(PublicKey publicKey)
          Set the public key.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PublicKeyCallback

public PublicKeyCallback(String prompt,
                         String[] algorithmNames)
Construct a new instance.

Parameters:
prompt - the prompt string
algorithmNames - the algorithm names to accept

PublicKeyCallback

public PublicKeyCallback(String prompt,
                         PublicKey publicKey,
                         String[] algorithmNames)
Construct a new instance.

Parameters:
prompt - the prompt string
publicKey - the public key value
algorithmNames - the algorithm names to accept
Method Detail

getPrompt

public String getPrompt()
Get the prompt string.

Returns:
the prompt string

getPublicKey

public PublicKey getPublicKey()
Get the public key.

Returns:
the public key

setPublicKey

public void setPublicKey(PublicKey publicKey)
Set the public key.

Parameters:
publicKey - the public key

getAlgorithmNames

public String[] getAlgorithmNames()
Get the acceptable algorithm names.

Returns:
the algorithm names

allows

public boolean allows(String name)
Convenience method to determine whether an algorithm name is allowed.

Parameters:
name - the algorithm name
Returns:
true if the algorithm is allowed

jboss-sasl 1.0.0.Beta1

Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.