I am trying to customize the UsernamePasswordCredential class by extending 
it from the CAS default class. However I am unable to proceed further as I 
am getting typecast issue in the doAuthentication() of 
AbstractUsernamePasswordAuthenticationHandler class. I have customized 
AbstractUsernamePasswordAuthenticationHandler to support the new Custom 
UsernamePasswordCredential class.


*Block of Code:*
public abstract class CustomAbstractUsernamePasswordAuthenticationHandler 
extends 
AbstractUsernamePasswordAuthenticationHandler {

@Override
protected final AuthenticationHandlerExecutionResult 
doAuthentication(Credential 
credential, final Service service) throws Throwable {
final CustomUsernamePasswordCredential originalUserPass = 
(CustomUsernamePasswordCredential) credential;
......
......
}
}
*Error Message: *
   
   - Cannot cast 
   
'org.apereo.cas.authentication.handler.support.CustomUsernamePasswordCredential'
 
   to 
   
'org.apereo.cas.authentication.handler.support.CustomUsernamePasswordCredential'
 


-- 
- Website: https://apereo.github.io/cas
- List Guidelines: https://goo.gl/1VRrw7
- Contributions: https://goo.gl/mh7qDG
--- 
You received this message because you are subscribed to the Google Groups "CAS 
Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/70db0edb-2b5e-4f5d-91b4-f603acae3b01n%40apereo.org.

Reply via email to