Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Plan
Issues
27
Issue boards
Milestones
Code
Merge requests
1
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Privacy
Imprint
Contact
Snippets
Groups
Projects
Show more breadcrumbs
ARSnova
ARSnova Backend
Commits
2b80713c
Commit
2b80713c
authored
10 years ago
by
Daniel Gerhardt
Committed by
Daniel Gerhardt
10 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Avoid use of deprecated methods
parent
1625e616
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/config/SecurityConfig.java
+5
-7
5 additions, 7 deletions
src/main/java/de/thm/arsnova/config/SecurityConfig.java
with
5 additions
and
7 deletions
src/main/java/de/thm/arsnova/config/SecurityConfig.java
+
5
−
7
View file @
2b80713c
...
@@ -37,6 +37,7 @@ import org.springframework.security.web.authentication.Http403ForbiddenEntryPoin
...
@@ -37,6 +37,7 @@ import org.springframework.security.web.authentication.Http403ForbiddenEntryPoin
import
org.springframework.security.web.authentication.logout.LogoutFilter
;
import
org.springframework.security.web.authentication.logout.LogoutFilter
;
import
org.springframework.security.web.authentication.logout.LogoutSuccessHandler
;
import
org.springframework.security.web.authentication.logout.LogoutSuccessHandler
;
import
org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler
;
import
org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler
;
import
org.springframework.security.web.util.matcher.AntPathRequestMatcher
;
import
com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationProvider
;
import
com.github.leleuj.ss.oauth.client.authentication.OAuthAuthenticationProvider
;
import
com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationEntryPoint
;
import
com.github.leleuj.ss.oauth.client.web.OAuthAuthenticationEntryPoint
;
...
@@ -225,7 +226,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -225,7 +226,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
@Bean
public
LogoutFilter
casLogoutFilter
()
{
public
LogoutFilter
casLogoutFilter
()
{
LogoutFilter
filter
=
new
LogoutFilter
(
casLogoutSuccessHandler
(),
logoutHandler
());
LogoutFilter
filter
=
new
LogoutFilter
(
casLogoutSuccessHandler
(),
logoutHandler
());
filter
.
set
FilterProcessesUrl
(
"/j_spring_cas_security_logout"
);
filter
.
set
LogoutRequestMatcher
(
new
AntPathRequestMatcher
(
"/j_spring_cas_security_logout"
)
)
;
return
filter
;
return
filter
;
}
}
...
@@ -253,14 +254,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -253,14 +254,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
final
FacebookProvider
provider
=
new
FacebookProvider
();
final
FacebookProvider
provider
=
new
FacebookProvider
();
provider
.
setKey
(
securityFacebookKey
);
provider
.
setKey
(
securityFacebookKey
);
provider
.
setSecret
(
securityFacebookSecret
);
provider
.
setSecret
(
securityFacebookSecret
);
provider
.
setCallbackUrl
(
rootUrl
+
"/j_spring_facebook_security_check"
);
provider
.
setCallbackUrl
(
rootUrl
+
contextPath
+
"/j_spring_facebook_security_check"
);
return
provider
;
return
provider
;
}
}
@Bean
@Bean
public
OAuthAuthenticationFilter
facebookFilter
()
throws
Exception
{
public
OAuthAuthenticationFilter
facebookFilter
()
throws
Exception
{
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_facebook_security_check"
);
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_facebook_security_check"
);
filter
.
setFilterProcessesUrl
(
"/j_spring_facebook_security_check"
);
filter
.
setProvider
(
facebookProvider
());
filter
.
setProvider
(
facebookProvider
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
...
@@ -282,14 +282,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -282,14 +282,13 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
final
TwitterProvider
provider
=
new
TwitterProvider
();
final
TwitterProvider
provider
=
new
TwitterProvider
();
provider
.
setKey
(
securityTwitterKey
);
provider
.
setKey
(
securityTwitterKey
);
provider
.
setSecret
(
securityTwitterSecret
);
provider
.
setSecret
(
securityTwitterSecret
);
provider
.
setCallbackUrl
(
rootUrl
+
"/j_spring_twitter_security_check"
);
provider
.
setCallbackUrl
(
rootUrl
+
contextPath
+
"/j_spring_twitter_security_check"
);
return
provider
;
return
provider
;
}
}
@Bean
@Bean
public
OAuthAuthenticationFilter
twitterFilter
()
throws
Exception
{
public
OAuthAuthenticationFilter
twitterFilter
()
throws
Exception
{
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_twitter_security_check"
);
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_twitter_security_check"
);
filter
.
setFilterProcessesUrl
(
"/j_spring_twitter_security_check"
);
filter
.
setProvider
(
twitterProvider
());
filter
.
setProvider
(
twitterProvider
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
...
@@ -311,7 +310,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -311,7 +310,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
final
Google2Provider
provider
=
new
Google2Provider
();
final
Google2Provider
provider
=
new
Google2Provider
();
provider
.
setKey
(
securityGoogleKey
);
provider
.
setKey
(
securityGoogleKey
);
provider
.
setSecret
(
securityGoogleSecret
);
provider
.
setSecret
(
securityGoogleSecret
);
provider
.
setCallbackUrl
(
rootUrl
+
"/j_spring_google_security_check"
);
provider
.
setCallbackUrl
(
rootUrl
+
contextPath
+
"/j_spring_google_security_check"
);
provider
.
setScope
(
Google2Scope
.
EMAIL
);
provider
.
setScope
(
Google2Scope
.
EMAIL
);
return
provider
;
return
provider
;
}
}
...
@@ -319,7 +318,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
...
@@ -319,7 +318,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Bean
@Bean
public
OAuthAuthenticationFilter
googleFilter
()
throws
Exception
{
public
OAuthAuthenticationFilter
googleFilter
()
throws
Exception
{
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_google_security_check"
);
final
OAuthAuthenticationFilter
filter
=
new
OAuthAuthenticationFilter
(
"/j_spring_google_security_check"
);
filter
.
setFilterProcessesUrl
(
"/j_spring_google_security_check"
);
filter
.
setProvider
(
twitterProvider
());
filter
.
setProvider
(
twitterProvider
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationManager
(
authenticationManager
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
filter
.
setAuthenticationFailureHandler
(
failureHandler
());
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment