|
1 | 1 | /*
|
2 |
| - * Copyright 2002-2017 the original author or authors. |
| 2 | + * Copyright 2002-2019 the original author or authors. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
15 | 15 | */
|
16 | 16 | package org.springframework.security.oauth2.core.user;
|
17 | 17 |
|
18 |
| -import org.springframework.security.core.AuthenticatedPrincipal; |
19 | 18 | import org.springframework.security.core.Authentication;
|
20 |
| -import org.springframework.security.core.GrantedAuthority; |
21 |
| - |
22 |
| -import java.util.Collection; |
23 |
| -import java.util.Map; |
| 19 | +import org.springframework.security.oauth2.core.OAuth2AuthenticatedPrincipal; |
24 | 20 |
|
25 | 21 | /**
|
26 | 22 | * A representation of a user {@code Principal}
|
|
37 | 33 | * Please consult the provider's API documentation for the set of supported user attribute names.
|
38 | 34 | *
|
39 | 35 | * <p>
|
40 |
| - * Implementation instances of this interface represent an {@link AuthenticatedPrincipal} |
| 36 | + * Implementation instances of this interface represent an {@link OAuth2AuthenticatedPrincipal} |
41 | 37 | * which is associated to an {@link Authentication} object
|
42 | 38 | * and may be accessed via {@link Authentication#getPrincipal()}.
|
43 | 39 | *
|
44 | 40 | * @author Joe Grandja
|
| 41 | + * @author Eddú Meléndez |
45 | 42 | * @since 5.0
|
46 | 43 | * @see DefaultOAuth2User
|
47 |
| - * @see AuthenticatedPrincipal |
| 44 | + * @see OAuth2AuthenticatedPrincipal |
48 | 45 | */
|
49 |
| -public interface OAuth2User extends AuthenticatedPrincipal { |
50 |
| - |
51 |
| - /** |
52 |
| - * Returns the authorities granted to the user. |
53 |
| - * |
54 |
| - * @return a {@code Collection} of {@link GrantedAuthority}(s) |
55 |
| - */ |
56 |
| - Collection<? extends GrantedAuthority> getAuthorities(); |
57 |
| - |
58 |
| - /** |
59 |
| - * Returns the attributes about the user. |
60 |
| - * |
61 |
| - * @return a {@code Map} of attributes about the user |
62 |
| - */ |
63 |
| - Map<String, Object> getAttributes(); |
| 46 | +public interface OAuth2User extends OAuth2AuthenticatedPrincipal { |
64 | 47 |
|
65 | 48 | }
|
0 commit comments