Skip to content

Commit

Permalink
Follow up on PR #628: formatting changes only to reduce indentation a…
Browse files Browse the repository at this point in the history
…nd better match convention used elsewhere, no functional changes
  • Loading branch information
jonesde committed Jan 10, 2024
1 parent a2fb0f4 commit f1f5f05
Showing 1 changed file with 19 additions and 30 deletions.
49 changes: 19 additions & 30 deletions framework/service/org/moqui/impl/UserServices.xml
Original file line number Diff line number Diff line change
Expand Up @@ -33,36 +33,25 @@ along with this software (see the LICENSE.md file). If not, see
<parameter name="loggedIn" type="Boolean"/>
</out-parameters>
<actions>
<if condition="ec.web?.sessionAttributes?.moquiPreAuthcUsername">
<then>
<!-- already pre-auth'ed, verify code below -->
<set field="username" from="ec.web?.sessionAttributes?.moquiPreAuthcUsername"/>
</then>
<else>
<!-- no pre-auth, try logging in (pre-auth if 2nd factor required) -->
<set field="loggedIn" from="ec.user.loginUser(username, password)"/>
</else>
</if>
<if condition="ec.web.sessionAttributes.moquiAuthcFactorRequired">
<then>
<if condition="code">
<then>
<service-call name="org.moqui.impl.UserServices.validate#ExternalUserAuthcCode"
in-map="[code:code]"
out-map="validateOut"/>
<if condition="validateOut.verified">
<then>
<set field="loggedIn" from="ec.user.internalLoginUser(validateOut.username)"/>
</then>
<else>
<message type="danger" public="true">Authentication code is not valid</message>
</else>
</if>
</then>
<else>
<service-call name="org.moqui.impl.UserServices.get#ExternalUserAuthcFactorInfo" out-map="context"/>
</else>
</if>
<if condition="ec.web?.sessionAttributes?.moquiPreAuthcUsername"><then>
<!-- already pre-auth'ed, verify code below -->
<set field="username" from="ec.web?.sessionAttributes?.moquiPreAuthcUsername"/>
</then><else>
<!-- no pre-auth, try logging in (pre-auth if 2nd factor required) -->
<set field="loggedIn" from="ec.user.loginUser(username, password)"/>
</else></if>
<if condition="ec.web.sessionAttributes.moquiAuthcFactorRequired"><then>
<if condition="code"><then>
<service-call name="org.moqui.impl.UserServices.validate#ExternalUserAuthcCode"
in-map="[code:code]" out-map="validateOut"/>
<if condition="validateOut.verified"><then>
<set field="loggedIn" from="ec.user.internalLoginUser(validateOut.username)"/>
</then><else>
<message type="danger" public="true">Authentication code is not valid</message>
</else></if>
</then><else>
<service-call name="org.moqui.impl.UserServices.get#ExternalUserAuthcFactorInfo" out-map="context"/>
</else></if>
</then></if>
</actions>
</service>
Expand Down

0 comments on commit f1f5f05

Please sign in to comment.