Polishing

Add missing javadoc to AuthoritiesExtractor and
FixedAuthoritiesExtractor
This commit is contained in:
Andy Wilkinson 2015-10-08 14:33:17 +01:00
parent 4768faaba7
commit 031a8d5afa
2 changed files with 15 additions and 0 deletions

View File

@ -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);
}

View File

@ -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 {