use of org.opencord.aaa.AuthenticationEvent in project aaa by opencord.
the class StateMachine method denyAccess.
/**
* RADIUS has denied the identification. Move to the next state if possible.
*/
public void denyAccess() {
states[currentState].radiusDenied();
// move to the next state
next(TRANSITION_DENY_ACCESS);
delegate.notify(new AuthenticationEvent(AuthenticationEvent.Type.DENIED, supplicantConnectpoint, toAuthRecord()));
// Clear mappings
deleteStateMachineMapping(this);
}
use of org.opencord.aaa.AuthenticationEvent in project aaa by opencord.
the class StateMachine method authorizeAccess.
/**
* RADIUS has accepted the identification. Move to the next state if possible.
*/
public void authorizeAccess() {
states[currentState].radiusAccepted();
// move to the next state
next(TRANSITION_AUTHORIZE_ACCESS);
delegate.notify(new AuthenticationEvent(AuthenticationEvent.Type.APPROVED, supplicantConnectpoint, toAuthRecord()));
// Clear mapping
deleteStateMachineMapping(this);
}
use of org.opencord.aaa.AuthenticationEvent in project aaa by opencord.
the class StateMachine method requestAccess.
/**
* An Identification information has been sent by the supplicant. Move to the
* next state if possible.
*/
public void requestAccess() {
states[currentState].requestAccess();
delegate.notify(new AuthenticationEvent(AuthenticationEvent.Type.REQUESTED, supplicantConnectpoint, toAuthRecord()));
// move to the next state
next(TRANSITION_REQUEST_ACCESS);
}
use of org.opencord.aaa.AuthenticationEvent in project aaa by opencord.
the class StateMachine method timeout.
private void timeout() {
boolean noTrafficWithinThreshold = (System.currentTimeMillis() - lastPacketReceivedTime) > ((cleanupTimerTimeOutInMins * 60 * 1000) / 2);
if (TIMEOUT_ELIGIBLE_STATES.contains(currentState) && noTrafficWithinThreshold) {
this.setSessionTerminateReason(SessionTerminationReasons.TIME_OUT.reason);
delegate.notify(new AuthenticationEvent(AuthenticationEvent.Type.TIMEOUT, this.supplicantConnectpoint, toAuthRecord()));
// If StateMachine is not eligible for cleanup yet, reschedule cleanupTimer further.
} else {
this.scheduleTimeout();
}
}
use of org.opencord.aaa.AuthenticationEvent in project aaa by opencord.
the class StateMachine method start.
/**
* Client has requested the start action to allow network access.
*/
public void start() {
this.scheduleTimeout();
states[currentState].start();
delegate.notify(new AuthenticationEvent(AuthenticationEvent.Type.STARTED, supplicantConnectpoint, toAuthRecord()));
// move to the next state
next(TRANSITION_START);
}
Aggregations