public class UserIdentity extends SecureIdentity
ApplicationIdentity| Modifier and Type | Field and Description |
|---|---|
protected byte[] |
encryptedPassword |
protected byte[] |
issuedIdentityToken |
protected String |
name |
protected UserTokenType |
type |
certificate, privateKey| Constructor and Description |
|---|
UserIdentity()
Create a default identity with Anonymous type.
|
UserIdentity(byte[] issuedIdentityToken)
Create an identity with a token issued by an external security system.
|
UserIdentity(Cert certificate,
PrivKey privateKey)
Create an identity with a user certificate.
|
UserIdentity(File certificateFile,
File privateKeyFile,
String privateKeyPassword)
Create an identity with a user certificate.
|
UserIdentity(String name,
String password)
Create an identity with user name & password.
|
UserIdentity(URL certificateFile,
URL privateKeyFile,
String privateKeyPassword)
Create an identity with a user certificate.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
decryptPassword(UserIdentityToken userIdentityToken,
ApplicationIdentity serverIdentity,
ByteString serverNonce,
Map<String,UserTokenPolicy> policyMap) |
protected void |
decryptPassword(UserIdentityToken userIdentityToken,
KeyPair[] serverKeys,
ByteString serverNonce,
Map<String,UserTokenPolicy> policyMap) |
boolean |
equals(Object obj) |
boolean |
equals(Object obj,
boolean requireSameType)
Check that the identity equals to another identity with the same type or a different type.
|
byte[] |
getEncryptedPassword() |
byte[] |
getIssuedIdentityToken() |
String |
getName() |
String |
getPassword() |
UserTokenType |
getType()
The user token type defines which authentication method is used.
|
int |
hashCode() |
String |
toString() |
decrypt, decrypt, encrypt, getCertificate, getKeys, getPrivateKeyprotected byte[] encryptedPassword
protected byte[] issuedIdentityToken
protected String name
protected UserTokenType type
public UserIdentity()
public UserIdentity(byte[] issuedIdentityToken)
public UserIdentity(Cert certificate, PrivKey privateKey)
public UserIdentity(File certificateFile, File privateKeyFile, String privateKeyPassword) throws IOException, SecureIdentityException
certificateFile - the file containing the user certificateprivateKeyFile - the file containing the user private keyprivateKeyPassword - password used to secure the private keyIOException - if the files cannot be readSecureIdentityException - if the certificate or private key file is not validpublic UserIdentity(String name, String password)
public UserIdentity(URL certificateFile, URL privateKeyFile, String privateKeyPassword) throws IOException, SecureIdentityException
certificateFile - the file containing the user certificateprivateKeyFile - the file containing the user private keyprivateKeyPassword - password used to secure the private keyIOException - if the files cannot be readSecureIdentityException - if the certificate or private key file is not validpublic boolean equals(Object obj)
equals in class SecureIdentitypublic boolean equals(Object obj, boolean requireSameType)
obj - the objects to compare this one torequireSameType - whether the types must be the same as well. If false, then the fields
are checked against another identity type.public byte[] getEncryptedPassword()
public byte[] getIssuedIdentityToken()
public String getName()
public String getPassword()
public UserTokenType getType()
public int hashCode()
hashCode in class SecureIdentityprotected void decryptPassword(UserIdentityToken userIdentityToken, ApplicationIdentity serverIdentity, ByteString serverNonce, Map<String,UserTokenPolicy> policyMap) throws SecureIdentityException
SecureIdentityExceptionprotected void decryptPassword(UserIdentityToken userIdentityToken, KeyPair[] serverKeys, ByteString serverNonce, Map<String,UserTokenPolicy> policyMap) throws SecureIdentityException
SecureIdentityExceptionCopyright © 2026. All rights reserved.