All Downloads are FREE. Search and download functionalities are using the official Maven repository.

webflow.mfa-yubikey.mfa-yubikey-webflow.xml Maven / Gradle / Ivy

There is a newer version: 7.2.0-RC3
Show newest version
<?xml version="1.0" encoding="UTF-8"?>
<flow xmlns="http://www.springframework.org/schema/webflow"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/webflow
                          http://www.springframework.org/schema/webflow/spring-webflow.xsd">

    <var name="credential" class="org.apereo.cas.adaptors.yubikey.YubiKeyCredential" />
    <on-start>
        <evaluate expression="initialFlowSetupAction" />
    </on-start>

    <action-state id="initializeLoginForm">
        <evaluate expression="initializeLoginAction" />
        <transition on="success" to="accountRegistrationCheck"/>
    </action-state>

    <action-state id="accountRegistrationCheck">
        <evaluate expression="yubiKeyAccountRegistrationAction" />
        <transition on="register" to="viewRegistration"/>
        <transition on="success" to="viewLoginFormYubiKey"/>
    </action-state>

    <view-state id="viewRegistration" view="casYubiKeyRegistrationView">
        <on-entry>
            <set name="viewScope.principal" value="conversationScope.authentication.principal" />
        </on-entry>
        <transition on="submit" to="saveRegistration"/>
    </view-state>
    
    <view-state id="viewLoginFormYubiKey" view="casYubiKeyLoginView" model="credential">
        <binder>
            <binding property="token" required="true"/>
        </binder>
        <on-entry>
            <set name="viewScope.principal" value="conversationScope.authentication.principal" />
        </on-entry>
        <transition on="submit" bind="true" validate="true" to="realSubmit"/>
    </view-state>

    <action-state id="saveRegistration">
        <evaluate expression="yubiKeySaveAccountRegistrationAction" />
        <transition on="success" to="viewLoginFormYubiKey"/>
        <transition on="error" to="initializeLoginForm" />
    </action-state>

    <action-state id="realSubmit">
        <evaluate expression="yubikeyAuthenticationWebflowAction" />
        <transition on="success" to="success" />
        <transition on="error" to="initializeLoginForm" />
    </action-state>

    <end-state id="success" />

</flow>




© 2015 - 2025 Weber Informatics LLC | Privacy Policy