Short answer is, you cannot (in a way that would safe and sensible). What do you mean by " compare the current service url to decide whether authenticate success or failed."?
--Misagh > From: "Donghua Liu" <[email protected]> > To: "CAS Community" <[email protected]> > Sent: Wednesday, May 2, 2018 12:14:11 AM > Subject: Re: [cas-user] How to obtain service url in my custom Authentication > Handlers > I went through this documentation, but I couldn't find how can I get the > requested service url. > 在 2018年5月2日星期三 UTC+8上午8:51:09,paul li写道: >> hi, >> You just need to follow what's in >> https://apereo.github.io/cas/5.2.x/installation/Configuring-Custom-Authentication.html >> step by step. >> 1. Create a custom authentication handler class >> public class MyAuthenticationHandler extends >> AbstractUsernamePasswordAuthenticationHandler { >> 2. Create a custom PlanConfiguation class that implements >> AuthenicationEventExecutionPlanConfigurer, to register your handler class >> @Configuration ( "MyAuthenticationEventExecutionPlanConfiguration" ) >> @EnableConfigurationProperties ( CasConfigurationProperties . class ) public >> class MyAuthenticationEventExecutionPlanConfiguration implements >> AuthenticationEventExecutionPlanConfigurer { >> 3. In src/main/resources/META-INF/spring.factories >> register your custom PlanConfiguation >> org.springframework.boot.autoconfigure.EnableAutoConfiguration = >> com.example.cas.MyAuthenticationEventExecutionPlanConfiguration >> Rebuild and deploy your code, it's best to set your log level to DEBUG to see >> the the debugg messages under org.aperero.cas... >> When CAS first starts, you'll see the custom PlanConfiguration class gets >> initialized, followed by your handler. >> Thanks >> On Tue, May 1, 2018 at 10:39 AM, Donghua Liu < [email protected] > wrote: >>> hi, >>> I want to implement a custome Authentication Handlers which get related >>> permission and compare the current service url to decide whether >>> authenticate >>> success or failed. >>> After reading Configuring-Custom-Authentication , It seems I need to extend >>> AbstractUsernamePasswordAuthenticationHandler , but I could not find any >>> clues >>> on how to get service url. >>> -- >>> - 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 [email protected] . >>> To view this discussion on the web visit >>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/6b4e24ec-c49b-4e26-8b92-7ca9a798306a%40apereo.org >>> . > -- > - 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 [email protected] . > To view this discussion on the web visit > https://groups.google.com/a/apereo.org/d/msgid/cas-user/3c832774-7329-43a5-befa-ffe6a9a2cd4c%40apereo.org > . -- - 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 [email protected]. To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/320054935.21396467.1525262705075.JavaMail.zimbra%40unicon.net.
