display error message for empty/invalid login field values

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

display error message for empty/invalid login field values

sshabbir
Hello,

It seems there is no configuration for displaying an error message, to
login.vm, when the user submits form with empty fields. How do I get error
messages to display for empty fields.

Here is some stuff I discovered along the name, not sure of relevance...

AbstractUsernamePasswordValidationAction seems to return the "NoCredentials"
eventId, and it is not picked up by ClassifiedMessageMap in
authn/password-authn-config.xml.

$authenticationErrorContext does not initialize for such errors.

The only way I can get any default message to display is

#set ($evContext =
$profileRequestContext.getSubcontext('org.opensaml.profile.context.EventContext').getEvent())

however, that appears on initial page load.

Trying to create a sub-flow, in conditions/conditions-flow.xml, as below
gives me flow error

<transition on="NoCredentials" to="CallNoCredentials" />  
.....

    <subflow-state id="CallNoCredentials"
subflow="authn/conditions/no-credentials">
        <input name="calledAsSubflow" value="true" />
        <transition on="proceed" to="DisplayUsernamePasswordPage" />
    </subflow-state>

Thanks in advance.




-----
Syed
--
Sent from: http://shibboleth.1660669.n2.nabble.com/Shibboleth-Users-f1660767.html
--
For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
To unsubscribe from this list send an email to [hidden email]
Syed
Reply | Threaded
Open this post in threaded view
|

Re: display error message for empty/invalid login field values

Peter Schober
* sshabbir <[hidden email]> [2018-07-24 23:02]:
> It seems there is no configuration for displaying an error message, to
> login.vm, when the user submits form with empty fields. How do I get error
> messages to display for empty fields.

You mean an error message that's (even more) specific to that case?

In my pretty-much-default IDP I do get an error message when just
submitting the login form with no username and no password:

  The username you entered cannot be identified.

The log has this to offer:

INFO [net.shibboleth.idp.authn.AbstractUsernamePasswordValidationAction:187]
- Profile Action ValidateUsernamePasswordAgainstLDAP: No username
available within UsernamePasswordContext

-peter
--
For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
To unsubscribe from this list send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: display error message for empty/invalid login field values

sshabbir
Thanks for that sanity check Peter.

I'll have a look at what I've done to disable/skip that messaging.

In hindsight, it seems a good idea to keep a default installation, for this
sort of issue.



-----
Syed
--
Sent from: http://shibboleth.1660669.n2.nabble.com/Shibboleth-Users-f1660767.html
--
For Consortium Member technical support, see https://wiki.shibboleth.net/confluence/x/coFAAg
To unsubscribe from this list send an email to [hidden email]
Syed