org.eclipse.higgins.idas.common
Class AuthNSelfIssuedMaterials

java.lang.Object
  extended by org.eclipse.higgins.idas.common.AuthNDigestMaterials
      extended by org.eclipse.higgins.idas.common.AuthNSelfIssuedMaterials
All Implemented Interfaces:
Serializable, org.eclipse.higgins.idas.api.IAuthNAttributesMaterials, org.eclipse.higgins.idas.api.IAuthNMaterials, org.eclipse.higgins.idas.api.IHasAttributes

public class AuthNSelfIssuedMaterials
extends AuthNDigestMaterials
implements org.eclipse.higgins.idas.api.IAuthNMaterials

Authorization materials comprised of privatepersonalidentifier, publicKey modulus, and publicKey exponent which may be used in IContext#open(Object). This class is intended to be used when the IdAS consumer is servicing a CardSpace request for secure token which uses a self-issued card as credentials. See Section 5.6 of A Guide to Integrating with InfoCard v1.0

See Also:
Serialized Form

Field Summary
static URI ATTR_TYPE_PPID
           
static URI ATTR_TYPE_PUBLIC_KEY_EXPONENT
           
static URI ATTR_TYPE_PUBLIC_KEY_MODULUS
           
static URI MANAGED_ATTR_TYPE_URI
           
static URI MANAGED_ATTR_URI
          Attribute URI for the attribute used to manage the secrets for this type of materials
 
Fields inherited from interface org.eclipse.higgins.idas.api.IAuthNMaterials
AUTHNMATERIALS_TYPE_ANONYMOUS, AUTHNMATERIALS_TYPE_IMPLIED, AUTHNMATERIALS_TYPE_LEASTPRIVILEGED, AUTHNMATERIALS_TYPE_MINFOCARD, AUTHNMATERIALS_TYPE_NAMEPRIVATEKEY, AUTHNMATERIALS_TYPE_PINFOCARD, AUTHNMATERIALS_TYPE_SAMLPOLICY, AUTHNMATERIALS_TYPE_USERNAMEPASSWORD
 
Constructor Summary
AuthNSelfIssuedMaterials(org.eclipse.higgins.idas.api.IContext context, byte[] ppid, byte[] publicKeyMod, byte[] publicKeyExp)
          Constructs an AuthNSelfIssuedMaterials by taking the ppid and publicKey as byte [] objects.
AuthNSelfIssuedMaterials(org.eclipse.higgins.idas.api.IContext context, String b64PPID, String b64PublicKeyMod, String b64PublicKeyExp)
          Constructs an AuthNSelfIssuedMaterials by taking the ppid and publicKey as byte [] objects.
 
Method Summary
 org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
           
 org.eclipse.higgins.idas.api.IAttribute addAttribute(URI attrID)
           
 org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType, String entityId)
           
 boolean equals(org.eclipse.higgins.idas.api.IHasAttributes attributes)
           
 org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
           
 Iterator getAttributes()
           
 org.eclipse.higgins.idas.api.IAttribute getManagedAttr()
           
 URI getManagedAttrID()
           
 byte[] getPPIDBytes()
          Returns the private personal identifier (ppid).
 String getPPIDString()
          Returns the private personal identifier (ppid).
 byte[] getPublicKeyExpBytes()
          Returns the public key exponent.
 String getPublicKeyExpString()
          Returns the public key exponent.
 byte[] getPublicKeyModBytes()
          Returns the public key modulus.
 String getPublicKeyModString()
          Returns the public key modulus.
 byte[] getSHA1Digest()
           
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MANAGED_ATTR_URI

public static final URI MANAGED_ATTR_URI
Attribute URI for the attribute used to manage the secrets for this type of materials


MANAGED_ATTR_TYPE_URI

public static final URI MANAGED_ATTR_TYPE_URI

ATTR_TYPE_PPID

public static final URI ATTR_TYPE_PPID

ATTR_TYPE_PUBLIC_KEY_MODULUS

public static final URI ATTR_TYPE_PUBLIC_KEY_MODULUS

ATTR_TYPE_PUBLIC_KEY_EXPONENT

public static final URI ATTR_TYPE_PUBLIC_KEY_EXPONENT
Constructor Detail

AuthNSelfIssuedMaterials

public AuthNSelfIssuedMaterials(org.eclipse.higgins.idas.api.IContext context,
                                byte[] ppid,
                                byte[] publicKeyMod,
                                byte[] publicKeyExp)
                         throws org.eclipse.higgins.idas.api.IdASException
Constructs an AuthNSelfIssuedMaterials by taking the ppid and publicKey as byte [] objects.

Parameters:
ppid - private personal identifier of the identity
publicKeyMod - public key modulus for the identity
publicKeyExp - public key exponent for the identity
Throws:
org.eclipse.higgins.idas.api.IdASException

AuthNSelfIssuedMaterials

public AuthNSelfIssuedMaterials(org.eclipse.higgins.idas.api.IContext context,
                                String b64PPID,
                                String b64PublicKeyMod,
                                String b64PublicKeyExp)
                         throws org.eclipse.higgins.idas.api.IdASException
Constructs an AuthNSelfIssuedMaterials by taking the ppid and publicKey as byte [] objects.

Parameters:
b64PPID - Base64-encoded private personal identifier of the identity
b64PublicKeyMod - Base64-encoded public key modulus for the identity
b64PublicKeyExp - Base64-encoded public key exponent for the identity
Throws:
org.eclipse.higgins.idas.api.IdASException
Method Detail

getPPIDBytes

public byte[] getPPIDBytes()
                    throws org.eclipse.higgins.idas.api.IdASException
Returns the private personal identifier (ppid).

Returns:
The ppid in byte [] form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPublicKeyModBytes

public byte[] getPublicKeyModBytes()
                            throws org.eclipse.higgins.idas.api.IdASException
Returns the public key modulus. IdAS Context Providers may also wish to access the public key in IAttribute form as follows:
 IAttribute publicKeyAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PUBLIC_KEY_MODULUS));

Returns:
The public key in byte [] form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPublicKeyExpBytes

public byte[] getPublicKeyExpBytes()
                            throws org.eclipse.higgins.idas.api.IdASException
Returns the public key exponent. IdAS Context Providers may also wish to access the public key in IAttribute form as follows:
 IAttribute publicKeyAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PUBLIC_KEY_EXPONENT));

Returns:
The public key in byte [] form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPPIDString

public String getPPIDString()
                     throws org.eclipse.higgins.idas.api.IdASException
Returns the private personal identifier (ppid). IdAS Context Providers may also wish to access the ppid in IAttribute form as follows:
 IAttribute ppidAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PPID));

Returns:
The ppid in String form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPublicKeyModString

public String getPublicKeyModString()
                             throws org.eclipse.higgins.idas.api.IdASException
Returns the public key modulus. IdAS Context Providers may also wish to access the public key in IAttribute form as follows:
 IAttribute publicKeyAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PUBLIC_KEY_MODULUS));

Returns:
The public key in String form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPublicKeyExpString

public String getPublicKeyExpString()
                             throws org.eclipse.higgins.idas.api.IdASException
Returns the public key exponent. IdAS Context Providers may also wish to access the public key in IAttribute form as follows:
 IAttribute publicKeyAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PUBLIC_KEY_EXPONENT));

Returns:
The public key in String form
Throws:
org.eclipse.higgins.idas.api.IdASException

addAttribute

public org.eclipse.higgins.idas.api.IAttribute addAttribute(URI attrID)
                                                     throws org.eclipse.higgins.idas.api.IdASException,
                                                            org.eclipse.higgins.idas.api.InvalidTypeException
Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.InvalidTypeException

addAttribute

public org.eclipse.higgins.idas.api.IAttribute addAttribute(org.eclipse.higgins.idas.api.IAttribute copyFrom)
                                                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getAttribute

public org.eclipse.higgins.idas.api.IAttribute getAttribute(URI attrID)
                                                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getAttributes

public Iterator getAttributes()
                       throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getAttributes in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

getSingleValuedAttribute

public org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
                                                                             throws org.eclipse.higgins.idas.api.IdASException,
                                                                                    org.eclipse.higgins.idas.api.NotSingleValuedAttributeException
Specified by:
getSingleValuedAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException
org.eclipse.higgins.idas.api.NotSingleValuedAttributeException

removeAttribute

public void removeAttribute(URI attrID)
                     throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttribute in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

removeAttributeValue

public void removeAttributeValue(URI attrID,
                                 Object value)
                          throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

removeAttributeValue

public void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
                          throws org.eclipse.higgins.idas.api.IdASException
Specified by:
removeAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException

equals

public boolean equals(org.eclipse.higgins.idas.api.IHasAttributes attributes)
               throws org.eclipse.higgins.idas.api.IdASException
Throws:
org.eclipse.higgins.idas.api.IdASException

getManagedAttr

public org.eclipse.higgins.idas.api.IAttribute getManagedAttr()
Specified by:
getManagedAttr in interface org.eclipse.higgins.idas.api.IAuthNAttributesMaterials

getManagedAttrID

public URI getManagedAttrID()
Specified by:
getManagedAttrID in interface org.eclipse.higgins.idas.api.IAuthNAttributesMaterials

getSHA1Digest

public final byte[] getSHA1Digest()
                           throws org.eclipse.higgins.idas.api.IdASException
Specified by:
getSHA1Digest in class AuthNDigestMaterials
Throws:
org.eclipse.higgins.idas.api.IdASException

addAttributeValue

public org.eclipse.higgins.idas.api.IEntity addAttributeValue(URI attrType,
                                                              String entityId)
                                                       throws org.eclipse.higgins.idas.api.IdASException
Specified by:
addAttributeValue in interface org.eclipse.higgins.idas.api.IHasAttributes
Throws:
org.eclipse.higgins.idas.api.IdASException