com.sun.xml.wss.impl.misc
Class DefaultCallbackHandler

java.lang.Object
  extended by com.sun.xml.wss.impl.misc.DefaultCallbackHandler
All Implemented Interfaces:
CallbackHandler

public class DefaultCallbackHandler
extends Object
implements CallbackHandler

A sample implementation of a CallbackHandler.


Nested Class Summary
 class DefaultCallbackHandler.X509CertificateValidatorImpl
           
 
Field Summary
static String CERTIFICATE_VALIDATOR
           
static String CERTSTORE_CBH
           
static String CERTSTORE_CERTSELECTOR
           
static String CERTSTORE_CRLSELECTOR
           
static String JAAS_KEYSTORE_LOGIN_MODULE
           
static String JMAC_CALLBACK_HANDLER
           
static String KEY_PASSWORD
           
static String KEYSTORE_CBH
           
static String KEYSTORE_CERTSELECTOR
           
static String KEYSTORE_PASSWORD
           
static String KEYSTORE_TYPE
           
static String KEYSTORE_URL
           
static String KRB5_CREDENTIAL_DELEGATION
           
static String KRB5_LOGIN_MODULE
           
static String KRB5_SERVICE_PRINCIPAL
           
static String MAX_CLOCK_SKEW_PROPERTY
           
static String MAX_NONCE_AGE_PROPERTY
           
protected  long maxClockSkewG
           
protected  long maxNonceAge
           
protected  String mcs
           
protected  String mna
           
static String MY_ALIAS
           
static String MY_ITERATIONS
           
static String MY_PASSWORD
           
static String MY_USERNAME
           
static String PASSWORD_CBH
           
static String PEER_ENTITY_ALIAS
           
static String REVOCATION_ENABLED
           
protected  boolean revocationEnabled
           
protected  String revocationEnabledAttr
           
static String SAML_CBH
           
static String SAML_VALIDATOR
           
static String SERVICE_ALIAS
           
static String STS_ALIAS
           
protected  String tfl
           
static String TIMESTAMP_FRESHNESS_LIMIT_PROPERTY
           
static String TIMESTAMP_VALIDATOR
           
protected  long timestampFreshnessLimitG
           
static String TRUSTSTORE_CBH
           
static String TRUSTSTORE_CERTSELECTOR
           
static String TRUSTSTORE_PASSWORD
           
static String TRUSTSTORE_TYPE
           
static String TRUSTSTORE_URL
           
static String USE_XWSS_CALLBACKS
           
static String USERNAME_CBH
           
static String USERNAME_VALIDATOR
           
 
Constructor Summary
DefaultCallbackHandler(String clientOrServer, Properties assertions)
           
DefaultCallbackHandler(String clientOrServer, Properties assertions, RealmAuthenticationAdapter adapter)
           
 
Method Summary
 PrivateKey getPrivateKey(byte[] ski, Map runtimeProps)
           
 PrivateKey getPrivateKey(String issuerName, BigInteger serialNumber, Map runtimeProps)
           
 PrivateKey getPrivateKey(X509Certificate certificate, Map runtimeProps)
           
 PrivateKey getPrivateKeyForThumbprint(byte[] ski, Map runtimeProps)
           
 Subject getRequesterSubject(Map context)
           
 SAMLAssertionValidator getSAMLValidator()
           
 void handle(Callback[] callbacks)
           
 void validateCreationTime(Date created, long maxClockSkew, long timestampFreshnessLimit)
           
 void validateExpirationTime(Date expires, long maxClockSkew, long timestampFreshnessLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

KEYSTORE_URL

public static final String KEYSTORE_URL
See Also:
Constant Field Values

KEYSTORE_TYPE

public static final String KEYSTORE_TYPE
See Also:
Constant Field Values

KEYSTORE_PASSWORD

public static final String KEYSTORE_PASSWORD
See Also:
Constant Field Values

KEY_PASSWORD

public static final String KEY_PASSWORD
See Also:
Constant Field Values

MY_ALIAS

public static final String MY_ALIAS
See Also:
Constant Field Values

MY_USERNAME

public static final String MY_USERNAME
See Also:
Constant Field Values

MY_PASSWORD

public static final String MY_PASSWORD
See Also:
Constant Field Values

MY_ITERATIONS

public static final String MY_ITERATIONS
See Also:
Constant Field Values

TRUSTSTORE_URL

public static final String TRUSTSTORE_URL
See Also:
Constant Field Values

TRUSTSTORE_TYPE

public static final String TRUSTSTORE_TYPE
See Also:
Constant Field Values

TRUSTSTORE_PASSWORD

public static final String TRUSTSTORE_PASSWORD
See Also:
Constant Field Values

PEER_ENTITY_ALIAS

public static final String PEER_ENTITY_ALIAS
See Also:
Constant Field Values

STS_ALIAS

public static final String STS_ALIAS
See Also:
Constant Field Values

SERVICE_ALIAS

public static final String SERVICE_ALIAS
See Also:
Constant Field Values

USERNAME_CBH

public static final String USERNAME_CBH
See Also:
Constant Field Values

PASSWORD_CBH

public static final String PASSWORD_CBH
See Also:
Constant Field Values

SAML_CBH

public static final String SAML_CBH
See Also:
Constant Field Values

KEYSTORE_CBH

public static final String KEYSTORE_CBH
See Also:
Constant Field Values

TRUSTSTORE_CBH

public static final String TRUSTSTORE_CBH
See Also:
Constant Field Values

USERNAME_VALIDATOR

public static final String USERNAME_VALIDATOR
See Also:
Constant Field Values

SAML_VALIDATOR

public static final String SAML_VALIDATOR
See Also:
Constant Field Values

TIMESTAMP_VALIDATOR

public static final String TIMESTAMP_VALIDATOR
See Also:
Constant Field Values

CERTIFICATE_VALIDATOR

public static final String CERTIFICATE_VALIDATOR
See Also:
Constant Field Values

MAX_CLOCK_SKEW_PROPERTY

public static final String MAX_CLOCK_SKEW_PROPERTY
See Also:
Constant Field Values

MAX_NONCE_AGE_PROPERTY

public static final String MAX_NONCE_AGE_PROPERTY
See Also:
Constant Field Values

TIMESTAMP_FRESHNESS_LIMIT_PROPERTY

public static final String TIMESTAMP_FRESHNESS_LIMIT_PROPERTY
See Also:
Constant Field Values

REVOCATION_ENABLED

public static final String REVOCATION_ENABLED
See Also:
Constant Field Values

CERTSTORE_CBH

public static final String CERTSTORE_CBH
See Also:
Constant Field Values

CERTSTORE_CERTSELECTOR

public static final String CERTSTORE_CERTSELECTOR
See Also:
Constant Field Values

CERTSTORE_CRLSELECTOR

public static final String CERTSTORE_CRLSELECTOR
See Also:
Constant Field Values

KEYSTORE_CERTSELECTOR

public static final String KEYSTORE_CERTSELECTOR
See Also:
Constant Field Values

TRUSTSTORE_CERTSELECTOR

public static final String TRUSTSTORE_CERTSELECTOR
See Also:
Constant Field Values

JMAC_CALLBACK_HANDLER

public static final String JMAC_CALLBACK_HANDLER
See Also:
Constant Field Values

KRB5_LOGIN_MODULE

public static final String KRB5_LOGIN_MODULE
See Also:
Constant Field Values

KRB5_SERVICE_PRINCIPAL

public static final String KRB5_SERVICE_PRINCIPAL
See Also:
Constant Field Values

KRB5_CREDENTIAL_DELEGATION

public static final String KRB5_CREDENTIAL_DELEGATION
See Also:
Constant Field Values

USE_XWSS_CALLBACKS

public static final String USE_XWSS_CALLBACKS
See Also:
Constant Field Values

JAAS_KEYSTORE_LOGIN_MODULE

public static final String JAAS_KEYSTORE_LOGIN_MODULE
See Also:
Constant Field Values

maxClockSkewG

protected long maxClockSkewG

timestampFreshnessLimitG

protected long timestampFreshnessLimitG

maxNonceAge

protected long maxNonceAge

revocationEnabledAttr

protected String revocationEnabledAttr

revocationEnabled

protected boolean revocationEnabled

mcs

protected String mcs

tfl

protected String tfl

mna

protected String mna
Constructor Detail

DefaultCallbackHandler

public DefaultCallbackHandler(String clientOrServer,
                              Properties assertions)
                       throws XWSSecurityException
Throws:
XWSSecurityException

DefaultCallbackHandler

public DefaultCallbackHandler(String clientOrServer,
                              Properties assertions,
                              RealmAuthenticationAdapter adapter)
                       throws Exception
Throws:
Exception
Method Detail

handle

public void handle(Callback[] callbacks)
            throws IOException,
                   UnsupportedCallbackException
Specified by:
handle in interface CallbackHandler
Parameters:
callbacks -
Throws:
IOException
UnsupportedCallbackException

getPrivateKey

public PrivateKey getPrivateKey(byte[] ski,
                                Map runtimeProps)
                         throws IOException
Parameters:
ski -
runtimeProps -
Returns:
Throws:
IOException

getPrivateKey

public PrivateKey getPrivateKey(String issuerName,
                                BigInteger serialNumber,
                                Map runtimeProps)
                         throws IOException
Parameters:
issuerName -
serialNumber -
runtimeProps -
Returns:
Throws:
IOException

getPrivateKey

public PrivateKey getPrivateKey(X509Certificate certificate,
                                Map runtimeProps)
                         throws IOException
Parameters:
certificate -
runtimeProps -
Returns:
Throws:
IOException

validateExpirationTime

public void validateExpirationTime(Date expires,
                                   long maxClockSkew,
                                   long timestampFreshnessLimit)
                            throws TimestampValidationCallback.TimestampValidationException
Throws:
TimestampValidationCallback.TimestampValidationException

validateCreationTime

public void validateCreationTime(Date created,
                                 long maxClockSkew,
                                 long timestampFreshnessLimit)
                          throws TimestampValidationCallback.TimestampValidationException
Throws:
TimestampValidationCallback.TimestampValidationException

getPrivateKeyForThumbprint

public PrivateKey getPrivateKeyForThumbprint(byte[] ski,
                                             Map runtimeProps)
                                      throws IOException
Parameters:
ski -
runtimeProps -
Returns:
Throws:
IOException

getRequesterSubject

public Subject getRequesterSubject(Map context)

getSAMLValidator

public SAMLAssertionValidator getSAMLValidator()


Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.