One way to provide error messages from a custom auth scheme back to the login page is to:
- Make the URL of the FCC page available to the auth scheme,
- If authenticatication fails create your error message and append it as a query string parameter to your FCC URL (loginUrl + "?ERRORMSG=" + errmsg)
- Set the lpszErrMsg authentication scheme argument with the value of your FCC URL
- When creating the SmAuthenticationResult, use SmAuthenticationResult.REASON_ERROR_MESSAGE_IS_REDIRECT as the second input parameter to the
SmAuthenticationResult constructor.
Your login page will either need to be a JSP/ASP/etc. that can obtain the query string error message parameter and display it, or a .fcc that uses Javascript to obtain and display the query string error message parameter.