Java Code Examples for org.openid4java.OpenIDException#VERIFY_ERROR

The following examples show how to use org.openid4java.OpenIDException#VERIFY_ERROR . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: VerifyRequest.java    From openid4java with Apache License 2.0 6 votes vote down vote up
public void validate() throws MessageException
{
    if (! MODE_CHKAUTH.equals(getParameterValue("openid.mode")))
    {
        throw new MessageException(
            "Invalid openid.mode in verification request: "
            + getParameterValue("openid.mode"),
            OpenIDException.VERIFY_ERROR);
    }

    set("openid.mode", MODE_IDRES);

    if (DEBUG) _log.debug("Delegating verification request validity check " +
                          "to auth response...");

    super.validate();

    set("openid.mode", MODE_CHKAUTH);
}
 
Example 2
Source File: VerifyResponse.java    From openid4java with Apache License 2.0 5 votes vote down vote up
public void validate() throws MessageException
{
    super.validate();

    if (! "true".equals(getParameterValue("is_valid")) &&
            ! "false".equals(getParameterValue("is_valid")) )
    {
        throw new MessageException(
            "Invalid is_valid value in verification response: "
             + getParameterValue("is_valid"),
            OpenIDException.VERIFY_ERROR);
    }
}