Search in sources :

Example 1 with AuthenticationEvent

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);
}
Also used : AuthenticationEvent(org.opencord.aaa.AuthenticationEvent)

Example 2 with AuthenticationEvent

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);
}
Also used : AuthenticationEvent(org.opencord.aaa.AuthenticationEvent)

Example 3 with AuthenticationEvent

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);
}
Also used : AuthenticationEvent(org.opencord.aaa.AuthenticationEvent)

Example 4 with AuthenticationEvent

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();
    }
}
Also used : AuthenticationEvent(org.opencord.aaa.AuthenticationEvent)

Example 5 with AuthenticationEvent

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);
}
Also used : AuthenticationEvent(org.opencord.aaa.AuthenticationEvent)

Aggregations

AuthenticationEvent (org.opencord.aaa.AuthenticationEvent)5