No idea why my reply got posted as completely empty.

The '#' is the URL fragment chunk of the URL. It is very unique and odd in 
how it works. The browser will not send it to the remote host. So you have 
to ensure that it is URL encoded on its way to CAS. If it isn't, the 
browser will likely interpret it as a fragment for the login page. Then you 
need to see what happens to it along the way. I would suggest using the 
network logger in the dev tools on your browser. From there you should be 
able to see what is happening to it. You should be able to see the fragment 
be present in the Location header from the redirect URL coming out of CAS 
back to your service. If it isn't in the Location header, then it got lost 
going to / in CAS. If it is in the Location header, then it is getting lost 
after CAS and in your app / browser.

Doing testing against CAS 6.6, so long as I URL encode in the service, it 
remains in the Location header going back to the service.

On Monday, January 15, 2024 at 2:45:05 AM UTC-6 Benny Lu wrote:

> Ray,
> Thanks for your reply and Forgive my not expressing myself clearly.
> My cas server is                                                   
> http://localhost:8881/login
> My cas client which is my protected service is     
> http://localhost:9280/login/cas
> My frontend target url is                                        
> http://localhost:9999/#/index
>
>
> So the whole url before url encoding  is 
> http://localhost:8881/login?service=http://localhost:9280/login/cas&target=http://localhost:9999/#/index
>
> But as I have already login into my cas server and I input the above url 
> on the browser  the redirected url became http://localhost:9999 instead 
> of http://localhost:9999/#/index
>
> Apparently the special characters which is  #  is missing and I don't know 
> when the characters is missing.
>
> BTW I have encoded  my url to like  
> http://localhost:8881/login?service=http://localhost:9280/login/cas%26target%3Dhttp%3A%2F%2Flocalhost%3A9999%2F%23%2Findex
> .
> unfortunately It has not worked.
>
>
> Benny
>
>
> Ray Bon <rb...@uvic.ca> 于2024年1月12日周五 02:50写道:
>
>> Benny,
>>
>> Something is amiss with your service URL
>> service=http://localhost:9280/cas/login... 
>> <http://localhost:9280/cas/login>
>>
>> The service parameter is the URL of the protected application.
>>
>> Assuming 8881 is your cas server, your url should look like (perhaps with 
>> more characters escaped)
>>
>> http://localhost:8881/cas/login?service=http://localhost:9280/login?ddtab=true%26target%3Dhttp%3A%2F%2Flocalhost%3A9999%2F%23%2Findex
>>  
>> <http://localhost:8881/login?service=http://localhost:9280/cas/login?ddtab=true%26target%3Dhttp%3A%2F%2Flocalhost%3A9999%2F%23%2Findex>
>>
>> If this is not correct, please explain your arrangement (which is cas 
>> server, which is the application you are trying to log in to and what the 
>> third service is)?
>>
>> Ray
>>
>> On Thu, 2024-01-11 at 15:43 +0800, Benny Lu wrote:
>>
>> Notice: This message was sent from outside the University of Victoria 
>> email system. Please be cautious with links and sensitive information.
>>
>> Hello: 
>>
>>
>> As shown in the pic
>> The original url is 
>>
>> http://localhost:8881/login?service=http://localhost:9280/cas/login?ddtab=true%26target%3Dhttp%3A%2F%2Flocalhost%3A9999%2F%23%2Findex
>>
>> but when the url got redirected the special characters disappears 
>>
>> I wonder when the special characters disappears and how can i keep the 
>> characters remain in my target url
>>
>>
>> Thanks!
>> regards
>>
>>
>> -- 
>> - 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+u...@apereo.org.
>> To view this discussion on the web visit 
>> https://groups.google.com/a/apereo.org/d/msgid/cas-user/c4545a2eadfc0bb2c1516fefde2a0ce3c2e8fa04.camel%40uvic.ca
>>  
>> <https://groups.google.com/a/apereo.org/d/msgid/cas-user/c4545a2eadfc0bb2c1516fefde2a0ce3c2e8fa04.camel%40uvic.ca?utm_medium=email&utm_source=footer>
>> .
>>
>

-- 
- 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/20091cf5-d45d-4774-9ada-1e5ef6a3e349n%40apereo.org.

Reply via email to