Polishing
Add missing javadoc to AuthoritiesExtractor and FixedAuthoritiesExtractor
This commit is contained in:
parent
4768faaba7
commit
031a8d5afa
|
@ -22,10 +22,20 @@ import java.util.Map;
|
|||
import org.springframework.security.core.GrantedAuthority;
|
||||
|
||||
/**
|
||||
* Strategy used by {@link UserInfoTokenServices} to extract authorities from the resource
|
||||
* server's response.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public interface AuthoritiesExtractor {
|
||||
|
||||
/**
|
||||
* Extract the authorities from the resource server's response.
|
||||
*
|
||||
* @param map the response
|
||||
* @return the extracted authorities
|
||||
*/
|
||||
List<GrantedAuthority> extractAuthorities(Map<String, Object> map);
|
||||
|
||||
}
|
||||
|
|
|
@ -26,7 +26,12 @@ import org.springframework.util.ObjectUtils;
|
|||
import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Default implementation of {@link AuthoritiesExtractor}. Extracts the authorities from
|
||||
* the map with the key {@code authorities}. If no such value exists, a single
|
||||
* {@code ROLE_USER} authority is returned.
|
||||
*
|
||||
* @author Dave Syer
|
||||
* @since 1.3.0
|
||||
*/
|
||||
public class FixedAuthoritiesExtractor implements AuthoritiesExtractor {
|
||||
|
||||
|
|
Loading…
Reference in New Issue