Package com.jk.webstack.security
Class MyAuthMapper
java.lang.Object
com.jk.webstack.security.MyAuthMapper
- All Implemented Interfaces:
 org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper
public class MyAuthMapper
extends Object
implements org.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper
This class is responsible for mapping authorities (roles) obtained from the
 authentication process to a custom collection of GrantedAuthority objects.
 
It allows customization of the authorities mapping logic.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionCollection<? extends org.springframework.security.core.GrantedAuthority>mapAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) This method maps a collection of authorities to a custom collection of GrantedAuthority objects. 
- 
Constructor Details
- 
MyAuthMapper
public MyAuthMapper() 
 - 
 - 
Method Details
- 
mapAuthorities
public Collection<? extends org.springframework.security.core.GrantedAuthority> mapAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities) This method maps a collection of authorities to a custom collection of GrantedAuthority objects.- Specified by:
 mapAuthoritiesin interfaceorg.springframework.security.core.authority.mapping.GrantedAuthoritiesMapper- Parameters:
 authorities- Specifies the original collection of authorities obtained during authentication.- Returns:
 - the custom collection of GrantedAuthority objects.
 
 
 -