Package org.eclipse.net4j.util.security
Class ChallengeNegotiator
java.lang.Object
org.eclipse.net4j.util.event.Notifier
org.eclipse.net4j.util.lifecycle.Lifecycle
org.eclipse.net4j.util.fsm.FiniteStateMachine<STATE,EVENT,INegotiationContext>
org.eclipse.net4j.util.security.Negotiator<IChallengeResponse.State,IChallengeResponse.Event>
org.eclipse.net4j.util.security.ChallengeResponseNegotiator
org.eclipse.net4j.util.security.ChallengeNegotiator
- All Implemented Interfaces:
INotifier
,INotifier.INotifier2
,IDeactivateable
,ILifecycle
,ILifecycle.DeferrableActivation
,IChallengeResponse
,INegotiationContext.Receiver
,INegotiator
- Author:
- Eike Stepper
-
Nested Class Summary
Nested classes/interfaces inherited from class org.eclipse.net4j.util.security.ChallengeResponseNegotiator
ChallengeResponseNegotiator.Transition
Nested classes/interfaces inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine
FiniteStateMachine.ChangeStateTransition, FiniteStateMachine.FailTransition, FiniteStateMachine.IgnoreTransition, FiniteStateMachine.StateChangedEvent
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.security.IChallengeResponse
IChallengeResponse.Event, IChallengeResponse.State
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.lifecycle.ILifecycle
ILifecycle.DeferrableActivation
Nested classes/interfaces inherited from interface org.eclipse.net4j.util.event.INotifier
INotifier.INotifier2
-
Field Summary
Fields inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine
FAIL, IGNORE
Fields inherited from interface org.eclipse.net4j.util.security.IChallengeResponse
ACKNOWLEDGE_FAILURE, ACKNOWLEDGE_SUCCESS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
createChallenge
(INegotiationContext context, ByteBuffer challenge) protected byte[]
protected void
protected byte[]
encryptToken
(String userID, byte[] token) int
protected boolean
handleResponse
(INegotiationContext context, ByteBuffer response) void
setRandomizer
(IRandomizer randomizer) void
setTokenLength
(int tokenLength) void
setUserManager
(IUserManager userManager) Methods inherited from class org.eclipse.net4j.util.security.ChallengeResponseNegotiator
getEncryptionAlgorithmName, getEncryptionIterationCount, getEncryptionSaltBytes, getState, handleAcknowledgement, handleChallenge, setEncryptionAlgorithmName, setEncryptionIterationCount, setEncryptionSaltBytes, setState
Methods inherited from class org.eclipse.net4j.util.security.Negotiator
getBufferEvent, getFailureState, getInitialState, getStartEvent, getSuccessState, handleFailure, handleSuccess, isInitiator, negotiate, postProcess, receiveBuffer
Methods inherited from class org.eclipse.net4j.util.fsm.FiniteStateMachine
changeState, createFailTransition, createIgnoreTransition, dump, formatFailMessage, formatIgnoreMessage, formatProcessMessage, getEvents, getStates, getTransition, init, init, initAll, initAll, initEvents, initEvents, initStates, initStates, process
Methods inherited from class org.eclipse.net4j.util.lifecycle.Lifecycle
activate, checkActive, checkArg, checkArg, checkInactive, checkNull, checkState, checkState, deactivate, deferredActivate, doActivate, doAfterActivate, doBeforeDeactivate, doDeactivate, dump, getLifecycleState, isActive, isDeferredActivation, toString
Methods inherited from class org.eclipse.net4j.util.event.Notifier
addListener, addUniqueListener, fireEvent, fireEvent, fireEvent, fireThrowable, firstListenerAdded, getListeners, getNotificationService, hasListener, hasListeners, lastListenerRemoved, listenerAdded, listenerRemoved, removeListener
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.eclipse.net4j.util.event.INotifier
addListener, getListeners, hasListeners, removeListener
-
Field Details
-
DEFAULT_TOKEN_LENGTH
public static final int DEFAULT_TOKEN_LENGTH- See Also:
-
-
Constructor Details
-
ChallengeNegotiator
public ChallengeNegotiator()
-
-
Method Details
-
getTokenLength
public int getTokenLength() -
setTokenLength
public void setTokenLength(int tokenLength) -
getRandomizer
-
setRandomizer
-
getUserManager
-
setUserManager
-
doBeforeActivate
- Overrides:
doBeforeActivate
in classChallengeResponseNegotiator
- Throws:
Exception
-
createRandomToken
protected byte[] createRandomToken() -
encryptToken
- Throws:
NegotiationException
-
createChallenge
- Overrides:
createChallenge
in classChallengeResponseNegotiator
-
handleResponse
- Overrides:
handleResponse
in classChallengeResponseNegotiator
-