@Target(value={PARAMETER,ANNOTATION_TYPE})
@Retention(value=RUNTIME)
@Documented
public @interface RegisteredOAuth2AuthorizedClient
OAuth2AuthorizedClient
.
For example:
@Controller public class MyController { @GetMapping("/authorized-client") public String authorizedClient(@RegisteredOAuth2AuthorizedClient("login-client") OAuth2AuthorizedClient authorizedClient) { // do something with authorizedClient } }
OAuth2AuthorizedClientArgumentResolver
Modifier and Type | Optional Element and Description |
---|---|
java.lang.String |
registrationId
Sets the client registration identifier.
|
java.lang.String |
value
The default attribute for this annotation.
|
@AliasFor(value="value") public abstract java.lang.String registrationId
@AliasFor(value="registrationId") public abstract java.lang.String value
registrationId()
.
For example, @RegisteredOAuth2AuthorizedClient("login-client")
is equivalent to
@RegisteredOAuth2AuthorizedClient(registrationId="login-client")
.