public class Credentials extends CredentialsBase
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DFLT_USER_CLASSIFICATION
The Constant DFLT_USER_CLASSIFICATION.
|
private java.lang.String |
userClearance
The user clearance.
|
DFLT_COUNTRY_DIGRAPH, userDN, userEmail, userNationality, userSid, x509Certificate
Constructor and Description |
---|
Credentials(java.lang.String userDN,
java.lang.String nationality,
java.lang.String clearance)
Instantiates a new credentials.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canAccess(java.lang.String classification)
Determine if the user with these credentials can access the data with
the given classification.
|
java.lang.String |
getBannerText()
Gets a classification string suitable for a page banner based on user's
highest allowed access.
|
java.lang.String |
getUserDistinguishedName()
Gets the user distinguished name.
|
java.lang.String |
getUserNationality()
Gets the user nationality.
|
java.lang.String |
getUserSid()
Gets the user sid.
|
java.security.cert.X509Certificate |
getX509Certificate()
Gets the x509 certificate.
|
void |
setX509Certificate(java.security.cert.X509Certificate certificate)
Sets the x509 certificate.
|
determineUserSID, getUserEmail, isApprovied
public static final java.lang.String DFLT_USER_CLASSIFICATION
private java.lang.String userClearance
public Credentials(java.lang.String userDN, java.lang.String nationality, java.lang.String clearance)
userDN
- the user dnnationality
- the nationalityclearance
- the clearancepublic boolean canAccess(java.lang.String classification) throws java.lang.Exception
CredentialsBase
canAccess
in class CredentialsBase
classification
- the classification of the data to be accessedjava.lang.Exception
- if classification is invalidpublic java.lang.String getBannerText()
CredentialsBase
getBannerText
in class CredentialsBase
public java.lang.String getUserDistinguishedName()
CredentialsBase
getUserDistinguishedName
in class CredentialsBase
public java.lang.String getUserNationality()
CredentialsBase
getUserNationality
in class CredentialsBase
public java.lang.String getUserSid()
CredentialsBase
getUserSid
in class CredentialsBase
public java.security.cert.X509Certificate getX509Certificate()
CredentialsBase
getX509Certificate
in class CredentialsBase
public void setX509Certificate(java.security.cert.X509Certificate certificate)
CredentialsBase
setX509Certificate
in class CredentialsBase
certificate
- the new x509 certificate