|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.prosysopc.ua.SecureIdentity
com.prosysopc.ua.UserIdentity
public class UserIdentity
User identity definition. Different Type and Policy can be used for user authentication. According to Type, you can specify also Name & Password , certificate KeyPair or an external token in the constructor.
ApplicationIdentity| Field Summary | |
|---|---|
protected byte[] |
encryptedPassword
|
protected byte[] |
issuedIdentityToken
|
protected String |
name
|
protected static Map<String,org.opcfoundation.ua.core.UserTokenPolicy> |
policyMap
|
protected org.opcfoundation.ua.core.UserTokenType |
type
|
| Fields inherited from class com.prosysopc.ua.SecureIdentity |
|---|
certificate, privateKey |
| Constructor Summary | |
|---|---|
UserIdentity()
Create a default identity with Anonymous type. |
|
UserIdentity(byte[] issuedIdentityToken)
Create an identity with a token issued by an external security system. |
|
UserIdentity(org.opcfoundation.ua.transport.security.Cert certificate,
org.opcfoundation.ua.transport.security.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. |
|
| Method Summary | |
|---|---|
protected void |
decryptPassword(org.opcfoundation.ua.core.UserIdentityToken userIdentityToken,
ApplicationIdentity serverIdentity,
org.opcfoundation.ua.builtintypes.ByteString serverNonce,
String algorithmUri)
|
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()
|
org.opcfoundation.ua.core.UserTokenType |
getType()
The user token type defines which authentication method is used. |
static org.opcfoundation.ua.core.UserTokenPolicy |
getUserTokenPolicy(String policyId)
Return a constant UserTokenPolicy defined with policyId |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class com.prosysopc.ua.SecureIdentity |
|---|
decrypt, decrypt, encrypt, getCertificate, getKeys, getPrivateKey |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static Map<String,org.opcfoundation.ua.core.UserTokenPolicy> policyMap
protected byte[] encryptedPassword
protected byte[] issuedIdentityToken
protected String name
protected org.opcfoundation.ua.core.UserTokenType type
| Constructor Detail |
|---|
public UserIdentity()
public UserIdentity(byte[] issuedIdentityToken)
public UserIdentity(org.opcfoundation.ua.transport.security.Cert certificate,
org.opcfoundation.ua.transport.security.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 key
IOException - if the files cannot be read
SecureIdentityException - if the certificate or private key file is not valid
public 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 key
IOException - if the files cannot be read
SecureIdentityException - if the certificate or private key file is not valid| Method Detail |
|---|
public static org.opcfoundation.ua.core.UserTokenPolicy getUserTokenPolicy(String policyId)
policyId - The policyId, as available from UserIdentityToken, for example
public boolean equals(Object obj)
equals in class SecureIdentity
public 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 org.opcfoundation.ua.core.UserTokenType getType()
public int hashCode()
hashCode in class SecureIdentitypublic String toString()
toString in class Object
protected void decryptPassword(org.opcfoundation.ua.core.UserIdentityToken userIdentityToken,
ApplicationIdentity serverIdentity,
org.opcfoundation.ua.builtintypes.ByteString serverNonce,
String algorithmUri)
throws SecureIdentityException
SecureIdentityException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||