Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ARSnova Backend
Manage
Activity
Members
Labels
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Operate
Environments
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
Paul-Christian Volkmer
ARSnova Backend
Commits
90f53b9d
Commit
90f53b9d
authored
10 years ago
by
Paul-Christian Volkmer
Browse files
Options
Downloads
Patches
Plain Diff
Use SimpleGrantedAuthority instead of deprecated GrantedAuthorityImpl
parent
263eeac1
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/de/thm/arsnova/CasUserDetailsService.java
+4
-5
4 additions, 5 deletions
src/main/java/de/thm/arsnova/CasUserDetailsService.java
with
4 additions
and
5 deletions
src/main/java/de/thm/arsnova/CasUserDetailsService.java
+
4
−
5
View file @
90f53b9d
...
...
@@ -24,19 +24,18 @@ import java.util.List;
import
org.jasig.cas.client.validation.Assertion
;
import
org.springframework.security.cas.userdetails.AbstractCasAssertionUserDetailsService
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.GrantedAuthority
Impl
;
import
org.springframework.security.core.authority.
Simple
GrantedAuthority
;
import
org.springframework.security.core.userdetails.User
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.stereotype.Service
;
@Service
public
class
CasUserDetailsService
extends
AbstractCasAssertionUserDetailsService
{
public
class
CasUserDetailsService
extends
AbstractCasAssertionUserDetailsService
{
@Override
protected
final
UserDetails
loadUserDetails
(
final
Assertion
assertion
)
{
final
List
<
GrantedAuthority
>
grantedAuthorities
=
new
ArrayList
<
GrantedAuthority
>();
grantedAuthorities
.
add
(
new
GrantedAuthority
Impl
(
"ROLE_USER"
));
grantedAuthorities
.
add
(
new
Simple
GrantedAuthority
(
"ROLE_USER"
));
return
new
User
(
assertion
.
getPrincipal
().
getName
(),
...
...
@@ -46,6 +45,6 @@ public class CasUserDetailsService extends
true
,
true
,
grantedAuthorities
);
);
}
}
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