public interface AliasTokenService extends org.nrg.framework.orm.hibernate.BaseHibernateService<AliasToken>
Modifier and Type | Method and Description |
---|---|
void |
deactivateAllTokensForUser(String xdatUserId)
Finds and deactivates all active tokens for a particular user.
|
List<AliasToken> |
findTokensForUser(String xdatUserId)
Finds all active tokens for a particular user.
|
void |
invalidateToken(String alias)
Invalidates the token with the given alias.
|
AliasToken |
issueTokenForUser(String xdatUserId)
Issues a token to the user with the indicated name.
|
AliasToken |
issueTokenForUser(XdatUser xdatUser)
Issues a token to the indicated user.
|
AliasToken |
issueTokenForUser(XdatUser xdatUser,
boolean isSingleUse)
Issues a token to the indicated user.
|
AliasToken |
issueTokenForUser(XdatUser xdatUser,
boolean isSingleUse,
Set<String> validIPAddresses)
Issues a token to the indicated user.
|
AliasToken |
issueTokenForUser(XdatUser xdatUser,
Set<String> validIPAddresses)
Issues a token to the indicated user.
|
AliasToken |
locateToken(String alias)
Locates and returns the token indicated by the alias string.
|
String |
validateToken(String alias,
long secret)
Checks whether a token exists with the indicated alias and secret and no IP address restrictions.
|
String |
validateToken(String alias,
long secret,
String address)
Checks whether a token exists with the indicated alias and secret and an IP address matching one of the defined
IP addresses (if there are no IP address restrictions in the token, any given IP address will match).
|
List<AliasToken> findTokensForUser(String xdatUserId)
xdatUserId
- The user ID from the XdatUser table.alias tokens
issued to the indicated user.void deactivateAllTokensForUser(String xdatUserId)
xdatUserId
- The user ID from the XdatUser table.AliasToken issueTokenForUser(String xdatUserId) throws Exception
xdatUserId
- The user ID from the XdatUser table.AliasToken
issued to the indicated user.Exception
- When something goes wrong.AliasToken issueTokenForUser(XdatUser xdatUser)
issueTokenForUser(XdatUser, boolean)
version of
this method, passing false by default for the boolean parameter.xdatUser
- The user requesting a token.AliasToken
issued to the indicated user.AliasToken issueTokenForUser(XdatUser xdatUser, boolean isSingleUse)
xdatUser
- The user requesting a token.isSingleUse
- Indicates whether the token should be disposed of once the token is used once.AliasToken
issued to the indicated user.AliasToken issueTokenForUser(XdatUser xdatUser, Set<String> validIPAddresses)
xdatUser
- The user requesting a token.validIPAddresses
- The list of IP addresses from which the alias token will be accepted.AliasToken
issued to the indicated user.AliasToken issueTokenForUser(XdatUser xdatUser, boolean isSingleUse, Set<String> validIPAddresses)
xdatUser
- The user requesting a token.isSingleUse
- Indicates whether the token should be disposed of once the token is used once.validIPAddresses
- The list of IP addresses from which the alias token will be accepted.AliasToken
issued to the indicated user.AliasToken locateToken(String alias)
token secret
and IP
addresses
have also been checked and validated against the requesting client.alias
- The alias for the requested token.String validateToken(String alias, long secret)
corresponding XDAT user login ID
. Otherwise, this method returns
null.alias
- The alias to check.secret
- The secret to validate the indicated alias.XDAT user login ID
of the matching token exists, or null if not.String validateToken(String alias, long secret, String address)
corresponding XDAT user login ID
. Otherwise, this method returns
null.alias
- The alias to check.secret
- The secret to validate the indicated alias.address
- The IP address to validate.XDAT user login ID
of the matching token exists, or null if not.void invalidateToken(String alias)
alias
- The alias of the token to be invalidated.Copyright © 2015 Neuroinformatics Research Group. All rights reserved.