org.eclipse.higgins.idas.common
Class AuthNNamePasswordMaterials

java.lang.Object
  extended byorg.eclipse.higgins.idas.common.AuthNNamePasswordMaterials
All Implemented Interfaces:
org.eclipse.higgins.idas.api.IAuthNAttributesMaterials, org.eclipse.higgins.idas.api.IHasAttributes

public class AuthNNamePasswordMaterials
extends Object
implements org.eclipse.higgins.idas.api.IAuthNAttributesMaterials

Simple username and password authorization materials which may be used in IContext.open(Object)


Field Summary
static URI ATTR_MANAGED_URI
          Attribute URI for the attribute used to manage the secrets for this type of materials
static URI ATTR_TYPE_USERNAME
           
 
Constructor Summary
AuthNNamePasswordMaterials(org.eclipse.higgins.idas.api.IContext context, String username, String password)
          Constructs an AuthNNamePasswordMaterials by taking the username and password as String 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)
           
 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 getManagedAttrURI()
           
 String getPassword()
          Returns the password.
 org.eclipse.higgins.idas.api.ISingleValuedAttribute getSingleValuedAttribute(URI attrID)
           
 String getUsername()
          Returns the username.
 void removeAttribute(URI attrID)
           
 void removeAttributeValue(org.eclipse.higgins.idas.api.IAttribute attr)
           
 void removeAttributeValue(URI attrID, Object value)
           
 String toString()
          This API is used by applications in debug or auditing scenarios and is not intended to reveal the password.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ATTR_TYPE_USERNAME

public static final URI ATTR_TYPE_USERNAME

ATTR_MANAGED_URI

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

Constructor Detail

AuthNNamePasswordMaterials

public AuthNNamePasswordMaterials(org.eclipse.higgins.idas.api.IContext context,
                                  String username,
                                  String password)
                           throws org.eclipse.higgins.idas.api.IdASException
Constructs an AuthNNamePasswordMaterials by taking the username and password as String objects.

Parameters:
context - needed in order to build attributes from username and password
username - name of identity
password - password of identity
Throws:
org.eclipse.higgins.idas.api.IdASException
Method Detail

getUsername

public String getUsername()
                   throws org.eclipse.higgins.idas.api.IdASException
Returns the username. IdAS Context Providers may also wish to access the username in IAttribute form as follows:
 IAttribute usernameAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_USERNAME));

Returns:
The username is String form
Throws:
org.eclipse.higgins.idas.api.IdASException

getPassword

public String getPassword()
                   throws org.eclipse.higgins.idas.api.IdASException
Returns the password. IdAS Context Providers may also wish to access the password in IAttribute form as follows:
 IAttribute passwordAttr = thisMaterials.getAttribute(new URI(thisMaterials.ATTR_TYPE_PASSWORD));

Returns:
The password is String form
Throws:
org.eclipse.higgins.idas.api.IdASException

toString

public String toString()
This API is used by applications in debug or auditing scenarios and is not intended to reveal the password.


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
Specified by:
equals in interface org.eclipse.higgins.idas.api.IHasAttributes
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

getManagedAttrURI

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