Revision 60603
Added by Konstantinos Triantafyllou about 3 years ago
AuthorizationService.java | ||
---|---|---|
20 | 20 |
public final String ANONYMOUS_USER = "ROLE_ANONYMOUS"; |
21 | 21 |
public final String REGISTERED_USER = "REGISTERED_USER"; |
22 | 22 |
|
23 |
public AuthorizationService() { |
|
24 |
} |
|
23 | 25 |
|
24 | 26 |
private String mapType(String type, boolean communityMap) { |
25 | 27 |
if (type.equals("organization")) { |
... | ... | |
74 | 76 |
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); |
75 | 77 |
return authentication instanceof OIDCAuthenticationToken ? ((OIDCAuthenticationToken)authentication).getSub() : null; |
76 | 78 |
} |
79 |
|
|
80 |
public String getEmail() { |
|
81 |
Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); |
|
82 |
return authentication instanceof OIDCAuthenticationToken ? ((OIDCAuthenticationToken)authentication).getUserInfo().getEmail() : null; |
|
83 |
} |
|
77 | 84 |
} |
Also available in: Unified diff
[Authorization Library | Redis]: Add getEmail on Authorization service