public static final class OAuth2AuthorizationConsent.Builder
extends java.lang.Object
implements java.io.Serializable
OAuth2AuthorizationConsent.| Modifier and Type | Method and Description |
|---|---|
OAuth2AuthorizationConsent.Builder |
authorities(java.util.function.Consumer<java.util.Set<org.springframework.security.core.GrantedAuthority>> authoritiesConsumer)
A
Consumer of the authorities, allowing the ability to add, replace or remove. |
OAuth2AuthorizationConsent.Builder |
authority(org.springframework.security.core.GrantedAuthority authority)
Adds a
GrantedAuthority to the collection of authorities in the
resulting OAuth2AuthorizationConsent. |
OAuth2AuthorizationConsent |
build()
Validate the authorities and build the
OAuth2AuthorizationConsent. |
OAuth2AuthorizationConsent.Builder |
scope(java.lang.String scope)
Adds a scope to the collection of
authorities in the resulting OAuth2AuthorizationConsent,
wrapping it in a SimpleGrantedAuthority, prefixed by SCOPE_. |
public OAuth2AuthorizationConsent.Builder scope(java.lang.String scope)
authorities in the resulting OAuth2AuthorizationConsent,
wrapping it in a SimpleGrantedAuthority, prefixed by SCOPE_. For example, a
message.write scope would be stored as SCOPE_message.write.scope - the scopeBuilder for further configurationpublic OAuth2AuthorizationConsent.Builder authority(org.springframework.security.core.GrantedAuthority authority)
GrantedAuthority to the collection of authorities in the
resulting OAuth2AuthorizationConsent.authority - the GrantedAuthorityBuilder for further configurationpublic OAuth2AuthorizationConsent.Builder authorities(java.util.function.Consumer<java.util.Set<org.springframework.security.core.GrantedAuthority>> authoritiesConsumer)
Consumer of the authorities, allowing the ability to add, replace or remove.authoritiesConsumer - a Consumer of the authoritiesBuilder for further configurationpublic OAuth2AuthorizationConsent build()
OAuth2AuthorizationConsent.
There must be at least one GrantedAuthority.OAuth2AuthorizationConsent