@Singleton public class DefaultOauthRouteUrlBuilder extends java.lang.Object implements OauthRouteUrlBuilder
OauthRouteUrlBuilder
.Modifier and Type | Method and Description |
---|---|
protected java.net.URL |
build(io.micronaut.http.HttpRequest<?> originating,
java.lang.String providerName,
java.lang.String uriTemplate)
Builds a URL with the provided arguments.
|
java.net.URI |
buildCallbackUri(java.lang.String providerName)
Builds the URI to receive the OAuth 2.0 authorization callback request.
|
java.net.URL |
buildCallbackUrl(io.micronaut.http.HttpRequest<?> originating,
java.lang.String providerName)
Builds the URL to receive the OAuth 2.0 authorization callback request.
|
java.net.URI |
buildLoginUri(java.lang.String providerName)
Builds the URI to start the OAuth 2.0 authorization code flow.
|
java.net.URL |
buildLoginUrl(io.micronaut.http.HttpRequest<?> originating,
java.lang.String providerName)
Builds the URL to start the OAuth 2.0 authorization code flow.
|
java.net.URL |
buildUrl(io.micronaut.http.HttpRequest<?> current,
java.lang.String path)
Builds an absolute URL for the given path.
|
protected java.lang.String |
getPath(java.lang.String uriTemplate,
java.lang.String providerName)
Builds the path portion of the URL.
|
public java.net.URL buildLoginUrl(@Nullable io.micronaut.http.HttpRequest<?> originating, java.lang.String providerName)
OauthRouteUrlBuilder
buildLoginUrl
in interface OauthRouteUrlBuilder
originating
- The originating requestproviderName
- The oauth provider namepublic java.net.URL buildCallbackUrl(@Nullable io.micronaut.http.HttpRequest<?> originating, java.lang.String providerName)
OauthRouteUrlBuilder
buildCallbackUrl
in interface OauthRouteUrlBuilder
originating
- The originating requestproviderName
- The oauth provider namepublic java.net.URI buildLoginUri(@Nullable java.lang.String providerName)
OauthRouteUrlBuilder
buildLoginUri
in interface OauthRouteUrlBuilder
providerName
- The oauth provider namepublic java.net.URI buildCallbackUri(@Nullable java.lang.String providerName)
OauthRouteUrlBuilder
buildCallbackUri
in interface OauthRouteUrlBuilder
providerName
- The oauth provider nameprotected java.net.URL build(@Nullable io.micronaut.http.HttpRequest<?> originating, java.lang.String providerName, java.lang.String uriTemplate)
originating
- The originating requestproviderName
- The oauth provider nameuriTemplate
- The URI templateprotected java.lang.String getPath(java.lang.String uriTemplate, java.lang.String providerName)
uriTemplate
- The uri templateproviderName
- The provider namepublic java.net.URL buildUrl(@Nullable io.micronaut.http.HttpRequest<?> current, java.lang.String path)
AbsoluteUrlBuilder
buildUrl
in interface AbsoluteUrlBuilder
current
- The current requestpath
- The path