Package org.cyclos.impl.access
Interface TokenServiceLocal
-
- All Superinterfaces:
CRUDService<TokenDTO,TokenData,TokenDataParams>,CRUDServiceLocal<Token,TokenDTO,TokenData,TokenDataParams>,Service,TokenService
public interface TokenServiceLocal extends TokenService, CRUDServiceLocal<Token,TokenDTO,TokenData,TokenDataParams>
Local interface forTokenService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcancel(Token token)voidcancelAll(BasicUser user)Cancels all active / blocked tokens of the given userlongexpireTokens()Takes all the tokens and switches their statuses to EXPIRED or ACTIVATION_EXPIRED for those who meet the conditions of these statuses.TokenfirstActive(BasicUser user, TokenPrincipalType type)Returns the first token for the given basic user, whose status isTokenStatus.ACTIVEvoidgenerateOnRegistrationTokens(BasicUser user)Generates the tokens that are configured to be generated upon registrationbyte[]getKeyMask(NFCToken nfcToken)Returns the key mask used to encrypt/decrypt the nfc token's keys (AMK and Operational)List<TokenType>getReceiveTokenTypes()Returns a list with the token types used for receive paymentsbooleanhasReachedMaxTokensPerUser(TokenPrincipalType type, BasicUser user, Token ignoredToken)Returns if the given user has reached the maximum possible assigned tokensvoidpersonalizeNFCTag(NFCTagWithChallengeDTO dto, BasicUser user)Same asTokenService.personalizeNFCTag(NFCTagPersonalizeDTO)but for a new user being registered.voidremoveAll(BasicUser basicUser)Removes all tokens related to the given uservoidvalidateNFCChallenge(String challenge)Validates the challenge received from a NFC tag/device ensuring it's the same as the previously generated by Cyclos.-
Methods inherited from interface org.cyclos.services.CRUDService
getData, getDataForNew, load, remove, removeAll, save
-
Methods inherited from interface org.cyclos.impl.CRUDServiceLocal
find, findAll, getEntityClass, newEntity, remove, removeAll, saveEntity, saveSkippingEntityLog, toDTO, toEntity, validate
-
Methods inherited from interface org.cyclos.services.access.TokenService
activate, activatePending, assign, barcode, block, cancel, cancelNFCToken, createDeviceConfirmationForPersonalizeNFCTag, deviceConfirmationBarcodeForPersonalizeNFCTag, exportTokens, getInitializeNFCTagData, getListData, getPersonalizeNFCTagData, getSearchData, initializeNFCTag, personalizeNFCTag, removeDeviceConfirmationForPersonalizeNFCTag, requestForExternalAuthenticate, requestNewOTPForPersonalizeNFCTag, search, setActivationDeadline, setExpiryDate, unblock, viewDeviceConfirmationForPersonalizeNFCTag
-
-
-
-
Method Detail
-
cancel
void cancel(Token token)
- See Also:
TokenService.cancel(Long)
-
cancelAll
void cancelAll(BasicUser user)
Cancels all active / blocked tokens of the given user
-
expireTokens
long expireTokens()
Takes all the tokens and switches their statuses to EXPIRED or ACTIVATION_EXPIRED for those who meet the conditions of these statuses.
-
firstActive
Token firstActive(BasicUser user, TokenPrincipalType type)
Returns the first token for the given basic user, whose status isTokenStatus.ACTIVE
-
generateOnRegistrationTokens
void generateOnRegistrationTokens(BasicUser user)
Generates the tokens that are configured to be generated upon registration
-
getKeyMask
byte[] getKeyMask(NFCToken nfcToken)
Returns the key mask used to encrypt/decrypt the nfc token's keys (AMK and Operational)
-
getReceiveTokenTypes
List<TokenType> getReceiveTokenTypes()
Returns a list with the token types used for receive payments
-
hasReachedMaxTokensPerUser
boolean hasReachedMaxTokensPerUser(TokenPrincipalType type, BasicUser user, Token ignoredToken)
Returns if the given user has reached the maximum possible assigned tokens
-
personalizeNFCTag
void personalizeNFCTag(NFCTagWithChallengeDTO dto, BasicUser user) throws TokenAlreadyInUseException
Same asTokenService.personalizeNFCTag(NFCTagPersonalizeDTO)but for a new user being registered.- Throws:
TokenAlreadyInUseException
-
removeAll
void removeAll(BasicUser basicUser)
Removes all tokens related to the given user
-
validateNFCChallenge
void validateNFCChallenge(String challenge)
Validates the challenge received from a NFC tag/device ensuring it's the same as the previously generated by Cyclos.- Parameters:
challenge- the HEXA string send back by a NFC tag/device.
-
-