public interface TokenService extends CRUDService<TokenDTO,TokenData,TokenDataParams>
| Modifier and Type | Method and Description |
|---|---|
void |
activatePending(@NotNull java.lang.Long tokenId)
Activates an already assigned token with status
TokenStatus.PENDING_ACTIVATION.This operation can only be done by admins/brokers over tokens of managed users or member over tokens of its operators with permission to activate the corresponding TokenPrincipalTypeVO. |
void |
assign(@NotNull TokenActionDTO dto,
UserLocatorVO locator)
Searches for a token with the given type and value specified in the
TokenActionDTO parameter.The token's status must be TokenStatus.UNASSIGNED orTokenStatus.PENDING_ACTIVATION but
assigned to the logged user or one of its operators.If the token is unassigned then this method assigns it to the user specified by the UserLocatorVO
parameter and change its status to TokenStatus.ACTIVE.Otherwise (the token is already adssigend and is pending by activation) it activates only. This method can be used only by members (i.e. |
SerializableInputStream |
barcode(@NotNull TokenBarcodeParams params)
Returns a barcode image of the token
|
void |
block(@NotNull java.lang.Long tokenId)
Blocks the given token
|
void |
cancel(@NotNull java.lang.Long tokenId)
Cancels the given token
|
void |
cancelNFCToken(@NotNull TokenActionDTO dto)
Cancels the given NFC token.
|
SerializableInputStream |
exportToCSV(@NotNull TokenQuery query)
Returns a CSV version of all returned tokens
|
InitializeNFCTagData |
getInitializeNFCTagData()
Returns data with the token types available to initialize a blank NFC tag.
The available tokens to personalize the tag are returned too to allow initialization and personalization at the same time. |
TokensListData |
getListData(@NotNull TokenPrincipalTypeVO tokenType,
@NotNull UserLocatorVO user)
Returns data for listing tokens of a given type and user
|
PersonalizeNFCTagData |
getPersonalizeNFCTagData(@NotNull TokenPrincipalTypeVO tokenType,
@NotNull UserLocatorVO locator)
Returns data needed to personalize a NFC tag for the specified type and user.
The PersonalizeNFCTagData.CONFIRMATION_PASSWORD_INPUT will be null if the logged user manages the given
user. |
TokenSearchData |
getSearchData(TokenPrincipalTypeVO tokenType)
Returns data for searching tokens
|
InitializeNFCTagResult |
initializeNFCTag(@NotNull NFCTagInitializeDTO dto)
Initializes and optionally personalize a NFC tag with the given data.
|
void |
personalizeNFCTag(@NotNull NFCTagPersonalizeDTO dto)
Personalizes a NFC tag for the given user.
|
ExternalNFCTagAuthenticateData |
requestForExternalAuthenticate(@NotNull ExternalNFCTagAuthenticateDTO dto)
This method must be invoked to start a mutual authentication process between the server and the NFC tag (e.g.
|
void |
requestNewOTPForPersonalizeNFCTag(@NotNull UserLocatorVO locator,
@NotNull TokenPrincipalTypeVO tokenTypeVO,
@NotNull SendMedium medium)
Generates a new OTP (removing any previous password, if any) and sends it to the user by the specified medium
using the confirmation password type set for the
BuiltInChannel.POS channel for the specified user.It has the same security controls as for personalizeNFCTag(NFCTagPersonalizeDTO), that is
the logged user must be allowed to personalize a NFC Tag for the specified user. |
Page<TokenVO> |
search(@NotNull TokenQuery query)
Searches for tokens.
|
void |
unblock(@NotNull java.lang.Long tokenId)
Unblocks the given token
|
getData, getDataForNew, load, remove, removeAll, savevoid activatePending(@NotNull
@NotNull java.lang.Long tokenId)
throws FrameworkException
TokenStatus.PENDING_ACTIVATION.TokenPrincipalTypeVO.FrameworkExceptionvoid assign(@NotNull
@NotNull TokenActionDTO dto,
UserLocatorVO locator)
throws FrameworkException,
MaxTokenActivationAttemptsException,
InvalidTokenException
TokenActionDTO parameter.TokenStatus.UNASSIGNED orTokenStatus.PENDING_ACTIVATION but
assigned to the logged user or one of its operators.UserLocatorVO
parameter and change its status to TokenStatus.ACTIVE.TokenPrincipalTypeVO.FrameworkExceptionMaxTokenActivationAttemptsExceptionInvalidTokenException#activatePending(Long)} for admins/brokers.SerializableInputStream barcode(@NotNull @NotNull TokenBarcodeParams params) throws FrameworkException
FrameworkExceptionvoid block(@NotNull
@NotNull java.lang.Long tokenId)
throws FrameworkException
FrameworkExceptionvoid cancel(@NotNull
@NotNull java.lang.Long tokenId)
throws FrameworkException
FrameworkExceptionvoid cancelNFCToken(@NotNull
@NotNull TokenActionDTO dto)
throws FrameworkException
TokenType.NFC_TAG.TokenType.NFC_DEVICE only the logged user can cancel its own token.FrameworkExceptionSerializableInputStream exportToCSV(@NotNull @NotNull TokenQuery query) throws FrameworkException
FrameworkExceptionInitializeNFCTagData getInitializeNFCTagData() throws FrameworkException
FrameworkExceptioninitializeNFCTag(NFCTagInitializeDTO)TokensListData getListData(@NotNull @NotNull TokenPrincipalTypeVO tokenType, @NotNull @NotNull UserLocatorVO user) throws FrameworkException
FrameworkExceptionPersonalizeNFCTagData getPersonalizeNFCTagData(@NotNull @NotNull TokenPrincipalTypeVO tokenType, @NotNull @NotNull UserLocatorVO locator) throws FrameworkException
PersonalizeNFCTagData.CONFIRMATION_PASSWORD_INPUT will be null if the logged user manages the given
user. The PersonalizeNFCTagData.TOKEN_TYPE is the token principal type the tag was initialized for.FrameworkExceptionTokenSearchData getSearchData(TokenPrincipalTypeVO tokenType) throws FrameworkException
FrameworkExceptionInitializeNFCTagResult initializeNFCTag(@NotNull @NotNull NFCTagInitializeDTO dto) throws FrameworkException, TokenAlreadyInUseException
TokenActionWithUserDTO.getUser() is not null then the token will be personalized for that user too.
Returns the private keys (PICC Master Key (i.e. PMK), Application Master Key (i.e. AMK) and Operational key) to
be stored into the tag.void personalizeNFCTag(@NotNull
@NotNull NFCTagPersonalizeDTO dto)
throws FrameworkException,
TokenAlreadyInUseException
requestForExternalAuthenticate(ExternalNFCTagAuthenticateDTO))NFCTagPersonalizeDTO.CYCLOS_CHALLENGE is the encrypted (hexadecimal string) challenge
generated by the server (returned in the previous external authenticate) used to ensure the tag presence
(internal authenticate)ExternalNFCTagAuthenticateData requestForExternalAuthenticate(@NotNull @NotNull ExternalNFCTagAuthenticateDTO dto) throws FrameworkException
dto - contains the token type id (required), the token value (optional) and an encrypted challenge
(required) generated by the tag in hexadecimal notation.
If the token value is null then means the authentication process will be using the PICC Master Key (PMK).ExternalNFCTagAuthenticateData.CYCLOS_CHALLENGE: encrypted data (hexadecimal string) containing both:
a new challenge generated by the server (used to validate the identity
of the NFC tag, internal authenticate) and the original challenge generated by the tag processed according to the
tag's
authentication process. The (processed) original tag challenge will be used by the NFC tag to complete the server
identity validation (external authenticate).ExternalNFCTagAuthenticateData.SESSION_KEY: A session key needed by the tag to allow send enciphered
data to be written into the NFC tagFrameworkExceptionvoid requestNewOTPForPersonalizeNFCTag(@NotNull
@NotNull UserLocatorVO locator,
@NotNull
@NotNull TokenPrincipalTypeVO tokenTypeVO,
@NotNull
@NotNull SendMedium medium)
throws FrameworkException,
SmsSendingException
BuiltInChannel.POS channel for the specified user.personalizeNFCTag(NFCTagPersonalizeDTO), that is
the logged user must be allowed to personalize a NFC Tag for the specified user.tokenTypeVO - the principal type used to personalize the cardmedium - the medium used to send the OTP.SmsSendingException - only if medium is SendMedium.SMS and the OTP could not be sent to any
enabled for sms phone.FrameworkExceptionPage<TokenVO> search(@NotNull @NotNull TokenQuery query) throws FrameworkException, QueryParseException
void unblock(@NotNull
@NotNull java.lang.Long tokenId)
throws FrameworkException
FrameworkException