Hi Guys
I have a working CAS applications. I am now trying to use its RestAPI.
But having trouble while calling /cas/v1/tickets
Our application has 2 factor authentication and hence have three fields
(username, password, otp) in the login page.
When it gets into the below DummyOTPAuthenticationHandler, the credential
is always a instanceof UsernamePasswordCredential
But I am expecting it to be the instance of our OTPUsernamePasswordCredential
as in our web application...
In our web application we have configured this in the login-webflow.xml
<var name="credential"
class="com.myapp.cas.authentication.OTPUsernamePasswordCredential" />
Not sure if RestAPI also uses this login-webflow.xml or if any other
configuration is needed ?
*Code:-*
public class DummyOTPAuthenticationHandler extends
AbstractUsernamePasswordAuthenticationHandler { /** Spring injected dummy
OTP */ private String dummyOTP; @Override protected HandlerResult
authenticateUsernamePasswordInternal(UsernamePasswordCredential credential)
throws GeneralSecurityException, PreventedException {
OTPUsernamePasswordCredential otpCredential = null; if (credential
instanceof OTPUsernamePasswordCredential) {
..............
Thanks
Jay
--
You are currently subscribed to [email protected] as:
[email protected]
To unsubscribe, change settings or access archives, see
http://www.ja-sig.org/wiki/display/JSG/cas-user