Hi

I need to upgrade working solution from cas 4.2.7 to latest. 4.2.7 solution 
is working perfectly but the latest 5.1.3 is a bit different and I cant get 
it to work - desperate already :(

Exception:
2017-09-08 00:56:18,748 WARN 
[org.apereo.cas.web.flow.resolver.impl.InitialAuthenticationAttemptWebflowEventResolver]
 
- <No authentication result builder can be located in the context>
java.lang.IllegalArgumentException: No authentication result builder can be 
located in the context


Custom web-flow:


<var name="loginModel" class="ee.LoginModel"/>


<view-state id="viewLoginForm" view="casLoginView" model="loginModel">
   <binder>
      <binding property="username"/>
      <binding property="password"/>
      <binding property="mobileNumber"/>
      <binding property="personalCode"/>
   </binder>
   <on-entry>
      <set name="viewScope.commandName" value="'loginModel'"/>
   </on-entry>
   <transition on="startMIDLogin" to="mIDLoginStart" bind="true" 
validate="false"/>
</view-state>


<action-state id="mIDLoginStart">
   <evaluate expression="mobileIDLoginAction.submit(flowRequestContext, 
flowScope.loginModel.getMobileNumber())"/>
   <transition on="success" to="viewMobileIDLoginCode"/>
   <transition on="error" to="viewLoginError"/>
</action-state>

<view-state id="viewMobileIDLoginCode" view="casMIDLoginCode">
   <transition on="check" to="checkMIDStatus"/>
</view-state>

<action-state id="checkMIDStatus">
   <evaluate expression="mobileIDLoginAction.check(flowRequestContext)"/>
   <transition on="success" to="credentialsSuccess"/>
   <transition on="outstanding" to="viewMobileIDLoginCode"/>
   <transition on="error" to="viewLoginError"/>
</action-state>


<action-state id="credentialsSuccess">
   <!-- This is how it's defined in cas 4.2.7 - unfortunately this does not 
work anymore in 5.1.3
      <evaluate 
expression="authenticationViaFormAction.submit(flowRequestContext, 
flowScope.IDCredential, messageContext)"/>
   -->
   <evaluate expression="authenticationViaFormAction"/>  <!-- THIS RAISES THE 
ERROR -->

   <transition on="warn" to="warn"/>

   <transition on="success" to="sendTicketGrantingTicket"/>
   <transition on="authenticationFailure" to="handleAuthenticationFailure"/>
   <transition on="error" to="initializeLoginForm"/>
</action-state>

As you can see from the comment, the line:

   <evaluate expression="authenticationViaFormAction"/> raises the exception. 

I'm pasting also other code:


@Component("mobileIDLoginAction")
public class MobileIDLoginAction {


@PostConstruct
public void init() {
 ....
}


public Event check(RequestContext context) {
   MobileIDSession session = (MobileIDSession) 
context.getFlowScope().get(MOBILE_SESSION);
   int checkCount = (int) context.getFlowScope().get(AUTH_COUNT);

...

}



public Event submit(RequestContext context, String mobileNumber) {
   try {
      MobileIDSession mIDSession = mIDAuthenticator.startLogin(mobileNumber);

....

}


public class IDCredential extends AbstractCredential {

   private String firstName;
   private String lastName;
   private String identityCode;
   private String phoneNumber;

....

}


public class LoginModel implements Serializable {

   private String mobileNumber;
   private String personalCode;
   private String country;
   private String username;
   private String password;

...

}



Exception:
2017-09-08 00:56:18,748 WARN 
[org.apereo.cas.web.flow.resolver.impl.InitialAuthenticationAttemptWebflowEventResolver]
 
- <No authentication result builder can be located in the context>
java.lang.IllegalArgumentException: No authentication result builder can be 
located in the context

Everything works inside MobileIDLoginAction and I just to accept 
authentication and that's it. 

Please help, I'm really in trouble and no idea how to continue at this 
point.

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/45d02905-7f74-4d6c-9b37-434cf0284c44%40apereo.org.

Reply via email to