|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.pba.repository.UserEntry
public class UserEntry
This is the implementation of the TokenLocator interface, where the entry and the token locator are the same and are the Distinguished Name of the entry. The object is used for matching the Subject domain and for locating the authorisation tokens of the user within the repository. Note that for the purposes of the Permis project the subject domain is identified by the entry the authorisation tokens are stored in, so this circumstance defines the return results of the methods.
Field Summary | |
---|---|
protected TokenLocator |
alternativeDN
|
static java.lang.String |
SN_ATTRIBUTE_TYPE
This variable sets the attribute type for the serial number in the DN, when constructing it for the IssuerSerial case. |
Constructor Summary | |
---|---|
protected |
UserEntry()
|
|
UserEntry(java.security.Principal subject)
This constructor builds an object by the name of the holder. |
|
UserEntry(java.security.Principal issuer,
java.math.BigInteger serialNumber)
This constructor builds an object by the name of the issuer and the serialNumber of the PKC. |
|
UserEntry(java.security.Principal subject,
java.security.Principal issuer,
java.math.BigInteger serialNumber)
This constructor builds the object by specifying all of the parameters. |
Method Summary | |
---|---|
protected void |
_init_(java.security.Principal subject,
java.security.Principal issuer,
java.math.BigInteger serialNumber)
This method is used to initialise the object by different constructors. |
boolean |
equals(java.lang.Object o)
Equality is performed by calling equals method on the objects representing Locator and Alternative Locator. |
TokenLocator |
getAlternativeLocator()
This method returns the Issuer DN combined with PKC Serial number as the alternative token locator. |
LDAPDNPrincipal |
getDN()
This method returns the main locator, or the alternative locator, if the former is null. |
Entry |
getEntry()
This method returns the name of the entry the object locates. |
java.security.Principal |
getEntryName()
This method will return the Entry Name - it is the same as getSubjectDN(); |
java.security.Principal |
getIssuerDN()
This method is used to retrieve the Issuer DN. |
java.security.Principal |
getLocator()
This method returns the Subject DN as the main locator. |
AttributeRepository |
getRepository()
This implementation assumes that since the DN of the entry is globally unique, it makes sense in any repository, so null is returned. |
java.math.BigInteger |
getSerialNumber()
This method is used to retrieve the serial number of the relevant PKC |
java.security.Principal |
getSubjectDN()
This method is used to retrieve the Subject DN. |
boolean |
isObjectClass(java.lang.String what)
This method always throws a SecurityException, since LDAP is not trusted to return the object class for DNs (user entries). |
static java.lang.String |
issuerSerialToDN(java.lang.String issuerDN,
java.math.BigInteger serialNumber)
This is the universal way for constructing the LDAP DN for the entry, whose name is constructed out of the PKC Issuer DN and PKC SN. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected TokenLocator alternativeDN
public static final java.lang.String SN_ATTRIBUTE_TYPE
Constructor Detail |
---|
protected UserEntry()
public UserEntry(java.security.Principal subject)
subject
- is the name of the holderpublic UserEntry(java.security.Principal issuer, java.math.BigInteger serialNumber)
issuer
- is the name of the issuerserialNumber
- is the serial number of the PKCpublic UserEntry(java.security.Principal subject, java.security.Principal issuer, java.math.BigInteger serialNumber)
subject
- is the name of the holderissuer
- is the name of the issuerserialNumber
- is the serial number of the PKCMethod Detail |
---|
protected void _init_(java.security.Principal subject, java.security.Principal issuer, java.math.BigInteger serialNumber)
subject
- is the name of the holderissuer
- is the name of the issuer for the alternate referenceserialNumber
- is the serial number of the PKC
java.lang.IllegalArgumentException
- if the parameters are invalid: both of
the references is null, or the serialNumber is null, when the issuer
name
is specifiedpublic static java.lang.String issuerSerialToDN(java.lang.String issuerDN, java.math.BigInteger serialNumber)
public java.security.Principal getSubjectDN()
public java.security.Principal getIssuerDN()
public java.math.BigInteger getSerialNumber()
public java.security.Principal getLocator()
getLocator
in interface TokenLocator
public AttributeRepository getRepository()
getRepository
in interface TokenLocator
public TokenLocator getAlternativeLocator()
getAlternativeLocator
in interface TokenLocator
public Entry getEntry()
TokenLocator
getEntry
in interface TokenLocator
public LDAPDNPrincipal getDN()
getDN
in interface LDAPEntry
public java.security.Principal getEntryName()
getEntryName
in interface Entry
public boolean isObjectClass(java.lang.String what)
isObjectClass
in interface LDAPEntry
what
- is the object class to compare to
SecurityException,
- since the User is not trusted to tell their
object Classpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |