public class SecurityToken extends Object
| Constructor and Description |
|---|
SecurityToken(SecurityConfiguration securityProfile,
int secureChannelId,
int tokenId,
long creationTime,
long lifetime,
ByteString serverNonce,
ByteString clientNonce)
Create new security token.
|
| Modifier and Type | Method and Description |
|---|---|
protected Mac |
createHmac(byte[] secret)
createHmac.
|
Mac |
createLocalHmac()
Create new localHmac.
|
Mac |
createRemoteHmac()
Crate new remoteHmac.
|
long |
getCreationTime()
Getter for the field
creationTime. |
long |
getLifeTime()
getLifeTime.
|
byte[] |
getLocalEncryptingKey()
Getter for the field
localEncryptingKey. |
byte[] |
getLocalInitializationVector()
Getter for the field
localInitializationVector. |
ByteString |
getLocalNonce()
Getter for the field
localNonce. |
byte[] |
getLocalSigningKey()
Getter for the field
localSigningKey. |
MessageSecurityMode |
getMessageSecurityMode()
getMessageSecurityMode.
|
byte[] |
getRemoteEncryptingKey()
Getter for the field
remoteEncryptingKey. |
byte[] |
getRemoteInitializationVector()
Getter for the field
remoteInitializationVector. |
ByteString |
getRemoteNonce()
Getter for the field
remoteNonce. |
byte[] |
getRemoteSigningKey()
Getter for the field
remoteSigningKey. |
long |
getRenewTime()
getRenewTime.
|
int |
getSecureChannelId()
Getter for the field
secureChannelId. |
SecurityConfiguration |
getSecurityConfiguration()
Getter for the field
securityConfiguration. |
SecurityPolicy |
getSecurityPolicy()
getSecurityPolicy.
|
int |
getTokenId()
Getter for the field
tokenId. |
boolean |
isExpired()
Return security tokens expired status.
|
boolean |
isTimeToRenew()
Return security token time to renew status.
|
boolean |
isValid()
Return security token validity.
|
void |
setLocalEncryptingKey(byte[] localEncryptingKey)
Setter for the field
localEncryptingKey. |
void |
setLocalInitializationVector(byte[] localInitializationVector)
Setter for the field
localInitializationVector. |
void |
setLocalSigningKey(byte[] localSigningKey)
Setter for the field
localSigningKey. |
void |
setRemoteEncryptingKey(byte[] remoteEncryptingKey)
Setter for the field
remoteEncryptingKey. |
void |
setRemoteInitializationVector(byte[] remoteInitializationVector)
Setter for the field
remoteInitializationVector. |
void |
setRemoteSigningKey(byte[] remoteSigningKey)
Setter for the field
remoteSigningKey. |
String |
toString() |
public SecurityToken(SecurityConfiguration securityProfile, int secureChannelId, int tokenId, long creationTime, long lifetime, ByteString serverNonce, ByteString clientNonce) throws ServiceResultException
securityProfile - a
SecurityConfiguration object.secureChannelId - a int.tokenId - a int.creationTime - a long.lifetime - a long.serverNonce - an array of byte.clientNonce - an array of byte.ServiceResultException - if any.public Mac createLocalHmac() throws ServiceResultException
ServiceResultException - if any.public Mac createRemoteHmac() throws ServiceResultException
ServiceResultException - if any.public long getCreationTime()
Getter for the field creationTime.
public long getLifeTime()
getLifeTime.
public byte[] getLocalEncryptingKey()
Getter for the field localEncryptingKey.
public byte[] getLocalInitializationVector()
Getter for the field localInitializationVector.
public ByteString getLocalNonce()
Getter for the field localNonce.
public byte[] getLocalSigningKey()
Getter for the field localSigningKey.
public MessageSecurityMode getMessageSecurityMode()
getMessageSecurityMode.
MessageSecurityMode object.public byte[] getRemoteEncryptingKey()
Getter for the field remoteEncryptingKey.
public byte[] getRemoteInitializationVector()
Getter for the field remoteInitializationVector.
public ByteString getRemoteNonce()
Getter for the field remoteNonce.
public byte[] getRemoteSigningKey()
Getter for the field remoteSigningKey.
public long getRenewTime()
getRenewTime.
public int getSecureChannelId()
Getter for the field secureChannelId.
public SecurityConfiguration getSecurityConfiguration()
Getter for the field securityConfiguration.
SecurityConfiguration object.public SecurityPolicy getSecurityPolicy()
getSecurityPolicy.
SecurityPolicy object.public int getTokenId()
Getter for the field tokenId.
public boolean isExpired()
public boolean isTimeToRenew()
public boolean isValid()
public void setLocalEncryptingKey(byte[] localEncryptingKey)
Setter for the field localEncryptingKey.
localEncryptingKey - an array of byte.public void setLocalInitializationVector(byte[] localInitializationVector)
Setter for the field localInitializationVector.
localInitializationVector - an array of byte.public void setLocalSigningKey(byte[] localSigningKey)
Setter for the field localSigningKey.
localSigningKey - an array of byte.public void setRemoteEncryptingKey(byte[] remoteEncryptingKey)
Setter for the field remoteEncryptingKey.
remoteEncryptingKey - an array of byte.public void setRemoteInitializationVector(byte[] remoteInitializationVector)
Setter for the field remoteInitializationVector.
remoteInitializationVector - an array of byte.public void setRemoteSigningKey(byte[] remoteSigningKey)
Setter for the field remoteSigningKey.
remoteSigningKey - an array of byte.protected Mac createHmac(byte[] secret) throws ServiceResultException
createHmac.
secret - an array of byte.Mac object.ServiceResultException - if any.Copyright © 2026. All rights reserved.