jboss-sasl 1.0.0.Beta1

org.jboss.sasl.util
Class AbstractSaslFactory

java.lang.Object
  extended by org.jboss.sasl.util.AbstractSaslFactory
Direct Known Subclasses:
AbstractAnonymousFactory, ClientTokenClientFactory, DigestMD5ServerFactory

public abstract class AbstractSaslFactory
extends Object

Abstract SASL factory base class.

Author:
David M. Lloyd

Constructor Summary
protected AbstractSaslFactory(String name)
          Construct a new instance.
 
Method Summary
 String[] getMechanismNames(Map<String,?> props)
          Get the mechanism names matching the given properties.
protected  boolean getPropertyValue(String property, Map<String,?> props, boolean defaultValue)
          Get a boolean property value from the properties map.
protected  boolean isActiveSusceptible()
          Determine whether the mechanism is susceptible to active attack.
protected  boolean isAnonymous()
          Determine whether the algorithm is anonymous.
protected  boolean isDictionarySusceptible()
          Determine whether the mechanism is susceptible to dictionary (passive) attacks.
protected  boolean isForwardSecrecy()
          Determine whether forward secrecy is implemented.
protected  boolean isIncluded(String... names)
          Determine whether our mechanism name is among those given.
protected  boolean isPassCredentials()
          Determine whether the mechanism passes client credentials.
protected  boolean isPlainText()
          Determine whether the algorithm employs plain text.
protected  boolean matches(Map<String,?> props)
          Determine whether the properties match this mechanism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractSaslFactory

protected AbstractSaslFactory(String name)
Construct a new instance.

Parameters:
name - the mechanism name
Method Detail

getMechanismNames

public String[] getMechanismNames(Map<String,?> props)
Get the mechanism names matching the given properties.

Parameters:
props - the properties
Returns:
the mechanism names

matches

protected boolean matches(Map<String,?> props)
Determine whether the properties match this mechanism.

Parameters:
props - the properties
Returns:
true if there is a match, false otherwise

isPassCredentials

protected boolean isPassCredentials()
Determine whether the mechanism passes client credentials.

Returns:
true if it does (default is false)

isDictionarySusceptible

protected boolean isDictionarySusceptible()
Determine whether the mechanism is susceptible to dictionary (passive) attacks.

Returns:
true if it is (default is true)

isActiveSusceptible

protected boolean isActiveSusceptible()
Determine whether the mechanism is susceptible to active attack.

Returns:
true if it is (default is true)

isForwardSecrecy

protected boolean isForwardSecrecy()
Determine whether forward secrecy is implemented.

Returns:
true if it is (default is false)

isPlainText

protected boolean isPlainText()
Determine whether the algorithm employs plain text.

Returns:
true if it does so (default is true)

isAnonymous

protected boolean isAnonymous()
Determine whether the algorithm is anonymous.

Returns:
true if it is (default is true)

getPropertyValue

protected boolean getPropertyValue(String property,
                                   Map<String,?> props,
                                   boolean defaultValue)
Get a boolean property value from the properties map.

Parameters:
property - the property name
props - the properties map
defaultValue - the default value
Returns:
the value

isIncluded

protected boolean isIncluded(String... names)
Determine whether our mechanism name is among those given.

Parameters:
names - the names
Returns:
true if the names include our mechanism

jboss-sasl 1.0.0.Beta1

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