@Entity
public class AliasToken
extends org.nrg.framework.orm.hibernate.AbstractHibernateEntity
Constructor and Description |
---|
AliasToken() |
Modifier and Type | Method and Description |
---|---|
String |
getAlias()
The alias is the primary reference to the token instance.
|
long |
getSecret()
Gets the token secret.
|
Set<String> |
getValidIPAddresses()
Returns a list of the IP addresses and address ranges from which requests using this
authentication token can originate.
|
String |
getXdatUserId()
The username of the XDAT user account for whom the token was issued.
|
static boolean |
isAliasFormat(String candidate)
Indicates whether the candidate string matches the format used by the token for aliases.
|
boolean |
isSingleUse()
Indicates whether this token is for a single use (e.g.
|
boolean |
isValidIPAddress(String address)
Tests whether the specified address matches one of the specified IP addresses.
|
void |
setAlias(String alias)
Sets the alias for the token.
|
void |
setSecret(long secret)
Sets the token secret.
|
void |
setSingleUse(boolean singleUse)
Sets whether this token is for a single use only.
|
void |
setValidIPAddresses(Set<String> validIPAddresses)
Sets the list of the IP addresses and address ranges from which requests using this
authentication token can originate.
|
void |
setXdatUserId(String xdatUserId)
Sets the username of the XDAT user account for whom the token was issued.
|
public String getAlias()
public void setAlias(String alias)
alias
- The alias to set for the token.public long getSecret()
public void setSecret(long secret)
secret
- A value representing the token secret.public boolean isSingleUse()
public void setSingleUse(boolean singleUse)
singleUse
- Whether the token is for a single use.public String getXdatUserId()
public void setXdatUserId(String xdatUserId)
xdatUserId
- The username of the XDAT user account for whom the token was issued.public Set<String> getValidIPAddresses()
public void setValidIPAddresses(Set<String> validIPAddresses)
public boolean isValidIPAddress(String address)
address
- The address to test.public static boolean isAliasFormat(String candidate)
candidate
- The string to test for format compatibility.Copyright © 2015 Neuroinformatics Research Group. All rights reserved.