[cas-user] Re: Extends LdapAuthenticationHandler in cas 5.2

2018-01-16 Thread satnam

Thanks,


In 4.2, we were overwriting preAuthenticate and postAuthenticate function 
to make our changes.


what is the best way to do this in 5.2?  attached is flow chart of what we 
are doing in 4.2


On Thursday, January 11, 2018 at 3:37:05 PM UTC-8, satnam wrote:
>
> Hello,
>
> We are trying to upgrade CAS from 4.2.7 to 5.2.x.  In 4.2, we extended 
> LdapAuthenticationHandler to make our customization (to convert GUID to 
> databaseUserID.. we use LDAP to verifty password, then return database 
> mapped ID to application, which application use latter in the process).  
> When we try to do same thing in 5.2, we get error on build.  
>
> Is there better way to do this in 5.2.x?  
>
>
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[16,8]
>  
> cannot access 
> org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
>   class file for 
> org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
>  
> not found
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[10,37]
>  
> cannot find symbol
>   symbol:   class UsernamePasswordCredential
>   location: package org.apereo.cas.authentication
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[11,47]
>  
> cannot find symbol
>   symbol:   class DefaultPrincipalFactory
>   location: package org.apereo.cas.authentication.principal
>
>
>
> package org.apereo.cas;
>
> import java.util.Map;
>
> import javax.validation.constraints.NotNull;
>
> import org.apereo.cas.authentication.HandlerResult;
> import org.apereo.cas.authentication.LdapAuthenticationHandler;
> import org.apereo.cas.authentication.Credential;
> import org.apereo.cas.authentication.UsernamePasswordCredential;
> import org.apereo.cas.authentication.principal.DefaultPrincipalFactory;
> import org.apereo.cas.authentication.principal.Principal;
> import org.apereo.cas.authentication.principal.PrincipalFactory;
> import org.ldaptive.auth.Authenticator;
>
> public class PostLdapAuthenticationHandler extends 
> LdapAuthenticationHandler {
> private IDAL dal = null;
>
> public PostLdapAuthenticationHandler(@NotNull final Authenticator 
> authenticator, final IDAL dal) {
> super(authenticator);
> this.dal = dal;
> }
>
>
> ..
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/6f4101ea-f895-4f27-8941-dc30f842a320%40apereo.org.


cas custom.pdf
Description: Adobe PDF document


[cas-user] Re: Extends LdapAuthenticationHandler in cas 5.2

2018-01-12 Thread Abylay

>
> Did you try to add the dependency with NotFound class?
>

1. Find the class in your IDE.
2. Add the dependency in which this class is located.

For AbstractUsernamePasswordAuthenticationHandler it would be 


org.apereo.cas
cas-server-core-authentication
${cas.version}
compile




-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/3f98b364-ca3c-429f-a8c8-d074e7046e0c%40apereo.org.


[cas-user] Re: Extends LdapAuthenticationHandler in cas 5.2

2018-01-11 Thread Pablo Vidaurri
Are you trying to map/release attributes? If so try to define a mapping in 
your service config:

"attributeReleasePolicy" : {
"@class" : "org.apereo.cas.services.ReturnMappedAttributeReleasePolicy",
"allowedAttributes" : {
  "@class" : "java.util.TreeMap",
  "mail" : "Email",
  "GivenName" : "GivenName",
  "commonName" : "Aliases"   <-- retrieves commonName from ldap but 
released as "Aliases" to client
}
  }

On Thursday, January 11, 2018 at 5:37:05 PM UTC-6, satnam wrote:
>
> Hello,
>
> We are trying to upgrade CAS from 4.2.7 to 5.2.x.  In 4.2, we extended 
> LdapAuthenticationHandler to make our customization (to convert GUID to 
> databaseUserID.. we use LDAP to verifty password, then return database 
> mapped ID to application, which application use latter in the process).  
> When we try to do same thing in 5.2, we get error on build.  
>
> Is there better way to do this in 5.2.x?  
>
>
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[16,8]
>  
> cannot access 
> org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
>   class file for 
> org.apereo.cas.authentication.handler.support.AbstractUsernamePasswordAuthenticationHandler
>  
> not found
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[10,37]
>  
> cannot find symbol
>   symbol:   class UsernamePasswordCredential
>   location: package org.apereo.cas.authentication
> [ERROR] 
> /C:/Projects/PASS5.2/trunk/build/CAS_Server/post-cas-server/src/main/java/gov/ca/post/PostLdapAuthenticationHandler.java:[11,47]
>  
> cannot find symbol
>   symbol:   class DefaultPrincipalFactory
>   location: package org.apereo.cas.authentication.principal
>
>
>
> package org.apereo.cas;
>
> import java.util.Map;
>
> import javax.validation.constraints.NotNull;
>
> import org.apereo.cas.authentication.HandlerResult;
> import org.apereo.cas.authentication.LdapAuthenticationHandler;
> import org.apereo.cas.authentication.Credential;
> import org.apereo.cas.authentication.UsernamePasswordCredential;
> import org.apereo.cas.authentication.principal.DefaultPrincipalFactory;
> import org.apereo.cas.authentication.principal.Principal;
> import org.apereo.cas.authentication.principal.PrincipalFactory;
> import org.ldaptive.auth.Authenticator;
>
> public class PostLdapAuthenticationHandler extends 
> LdapAuthenticationHandler {
> private IDAL dal = null;
>
> public PostLdapAuthenticationHandler(@NotNull final Authenticator 
> authenticator, final IDAL dal) {
> super(authenticator);
> this.dal = dal;
> }
>
>
> ..
>

-- 
- Website: https://apereo.github.io/cas
- Gitter Chatroom: https://gitter.im/apereo/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 cas-user+unsubscr...@apereo.org.
To view this discussion on the web visit 
https://groups.google.com/a/apereo.org/d/msgid/cas-user/9948b9c5-4e1c-4b92-a0d7-7b7d1d4735e2%40apereo.org.