@groovy.transform.CompileStatic class OAuth2AuthHandler extends java.lang.Object
An auth handler that provides OAuth2 Authentication support. This handler is suitable for AuthCode flows.
Constructor and description |
---|
OAuth2AuthHandler
(java.lang.Object delegate) |
Type | Name and description |
---|---|
AuthHandler |
addAuthorities(java.util.Set<java.lang.String> authorities) Add a set of required authorities for this auth handler |
AuthHandler |
addAuthority(java.lang.String authority) Add a required authority for this auth handler |
java.lang.String |
authURI(java.lang.String redirectURL, java.lang.String state) Build the authorization URL. |
static OAuth2AuthHandler |
create(OAuth2Auth authProvider, java.lang.String uri) Create a OAuth2 auth handler |
java.lang.Object |
getDelegate() |
void |
handle(RoutingContext arg0) |
OAuth2AuthHandler |
setupCallback(Route route) add the callback handler to a given route. |
Methods inherited from class | Name |
---|---|
class java.lang.Object |
java.lang.Object#wait(long, int), java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Add a set of required authorities for this auth handler
authorities
- the set of authoritiesAdd a required authority for this auth handler
authority
- the authorityBuild the authorization URL.
redirectURL
- where is the callback mounted.state
- state opaque token to avoid forged requestsCreate a OAuth2 auth handler
authProvider
- the auth provider to useadd the callback handler to a given route.
route
- a given route e.g.: `/callback`