--
public class DynamicRedirectCasAuthenticationEntryPoint extends CasAuthenticationEntryPoint
{
// ...
@Override
protected String createServiceUrl( final HttpServletRequest request, final HttpServletResponse response )
{
// here set your new serviceProperties based on the request etc. with your business logic
this.setServiceProperties( serviceProperties );
return super.createServiceUrl( request, response );
}
// ...
}
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.regexMatchers("/desktop/.*","/desktop?.*","/login.*")
.authenticated()
.and()
.authorizeRequests()
.regexMatchers("/")
.permitAll()
.and()
.httpBasic()
.authenticationEntryPoint(dynamicAuthenticationEntryPoint)
.and()
.logout().logoutSuccessUrl("/logout")
.and()
.addFilterBefore(singleSignOutFilter, CasAuthenticationFilter.class)
.addFilterBefore(logoutFilter, LogoutFilter.class);
}
--
- 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/f574fc4c-55ca-4c34-bb1f-d751a8f34553%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 cas-user+u...@apereo.org.
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/65664b69-5629-c7b5-f271-58ea62a1fedd%40caveo.ca.
.addFilterBefore( casAuthenticationFilter(), .....)
private CasAuthenticationFilter casAuthenticationFilter( )
{
CasAuthenticationFilter authenticationFilter = new CasAuthenticationFilter( );
authenticationFilter.setAuthenticationManager( authenticationManager );
return authenticationFilter;
}
@Bean
protected AuthenticationManager authenticationManager( )
{
return new ProviderManager( Arrays.asList( casAuthenticationProvider( ) ) );
}
@Bean
public CasAuthenticationProvider casAuthenticationProvider( )
{
final CasAuthenticationProvider provider = new CasAuthenticationProvider( );
provider.setServiceProperties( serviceProperties );
provider.setKey( "CAS_DUMMY_KEY" );
return provider;
}
--
- 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/879c0016-b851-436a-877d-b08d2a05ccb8%40apereo.org.
Can you refer how to get java cas client because I don't have any idea how to build java cas client can you help me
On Thu, Dec 19, 2019, 03:00 Colin Ryan <col...@caveo.ca> wrote:
Folks,
Me again...sorry...still trying yet another way to do what I need
done...le sigh...
Anyhow all these variations now lead me to this new question, hopefully
as I learn more about CAS my questions become more clear.
So I have my Web Application that is using Spring Security and CAS. I
need this application to support multiple dynamic contexts where each
context represents a Service definition in CAS which in turn has varying
authentication parameters for it.
So for example if someone enters on:
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/CADit65YP2QUSFubkDCbi4eBK7MRo_g3LSQa3WxfMY-9G19Hp9Q%40mail.gmail.com.
Ray,
Sorry my friend, I'm catching what your saying but just not groking it...I even backed out my DynamicCasAuthEntryPoint overridden class and still getting too many redirects even when not appending things to the serviceURL.
@Override
protected void configure(HttpSecurity http) throws Exception {
http
.authorizeRequests()
.regexMatchers("/desktop.*")
.authenticated()
.and()
.authorizeRequests()
.regexMatchers("/")
.permitAll()
.and()
.httpBasic()
.authenticationEntryPoint(authenticationEntryPoint)
.and()
.logout().logoutSuccessUrl("/logout")
.and()
.addFilterBefore(singleSignOutFilter, CasAuthenticationFilter.class)
.addFilterBefore(logoutFilter, LogoutFilter.class);
}
The service URL here is just https://host/desktop thus going to https://host/desktop redirects me properly to CAS but then upon redirect back with the ST gives me redirect errors.
I believe I"m understanding the implications of what you've describe (i.e. it's arriving back from CAS authorization with a ST ticket appended but this isn't meaning to the /desktop application that it's authenticated....
But again, don't get how to set the SecurityFilter routes other than the above which is based upon many of the examples I see online.
Alas as a reminder my requirement is to have an central multi-user application (/desktop) that in turn must take to user to CAS with something form of identifier (in my previous examples was the GET parameter) so that I can from a common app get mapped to specific set's of service definitions in CAS to ensure the user in question get's presented with the proper Authentication setup (not always just a difference in MFA so I can't rely on using step-up)
Le Sigh...
To view this discussion on the web visit https://groups.google.com/a/apereo.org/d/msgid/cas-user/011f349b69e809e2f2a551c70c49644df1c7ae8c.camel%40uvic.ca.