T - as TokenE - as TokenEventpublic interface TokenGenerator<T extends Token<T>,R extends TokenRequest,E extends TokenEvent<T>> extends ChangeGenerator<E>
TokenRequest.TokenGenerator maybe on a different machine like a phone etc.TokenGenerator may be the same or consult a TokenDispatcher.| Modifier and Type | Method and Description |
|---|---|
T |
generate(R request,
SingleTokenEvent<T> tokenEvent)
Generate a
Token based on Application defined input. |
T |
reGenerate(R request,
SingleTokenEvent<T> tokenEvent)
Incase of any error or problem, re-generate last token.
|
boolean |
validate(R request)
Similar to
#generate(TokenRequest), however in this case
there is no commitment to creating the actual Token. |
addChangeListener, getListeners, notifyAllListeners, setListenersT generate(R request, SingleTokenEvent<T> tokenEvent) throws TokenGenerationException
Token based on Application defined input.R - as requesttokenEvent - as SingleTokenEvent, for optional TokenEvent.getBehaviors() to be passedTokenGenerationExceptionT reGenerate(R request, SingleTokenEvent<T> tokenEvent) throws TokenProcessingException
R - as requesttokenEvent - as SingleTokenEvent, for optional TokenEvent.getBehaviors() to be passedTokenProcessingExceptionboolean validate(R request) throws TokenGenerationException
#generate(TokenRequest), however in this case
there is no commitment to creating the actual Token. if
it throws and Exception or returns false then means validation did not pass.request - as TokenGenerationExceptionCopyright © 2018. All rights reserved.