public class OAuth2ClientConfig extends Object
| Constructor and Description |
|---|
OAuth2ClientConfig() |
| Modifier and Type | Method and Description |
|---|---|
static String |
getHost(de.samply.common.config.OAuth2Client config,
String serverName)
Todo.
|
static String |
getLocalRedirectUrl(de.samply.common.config.OAuth2Client config,
String scheme,
String serverName,
int port,
String contextPath,
String redirectUrl)
Creates a URL for the current host.
|
static String |
getLocalRedirectUrl(String scheme,
String serverName,
int port,
String contextPath,
String redirectUrl)
Creates a URL for the current host.
|
static String |
getLogoutUrl(de.samply.common.config.OAuth2Client config,
String scheme,
String serverName,
int port,
String contextPath,
String localRedirectUrl)
Returns the logout URL for Samply Auth.
|
static String |
getRedirectUrl(de.samply.common.config.OAuth2Client config,
String scheme,
String serverName,
int port,
String contextPath,
String redirectUrl,
Scope... scopes)
Constructs the URL to the OAuth2 provider, using the provided configuration.
|
static String |
getRedirectUrl(de.samply.common.config.OAuth2Client config,
String scheme,
String serverName,
int port,
String contextPath,
String redirectUrl,
String state,
Scope... scopes)
Constructs the URL to the OAuth2 provider, using the provided configuration.
|
static String |
getRedirectUrlRegisterPerun(de.samply.common.config.OAuth2Client config,
String scheme,
String serverName,
int port,
String contextPath,
String redirectUrl,
String state,
Scope... scopes)
Constructs the URL for the perun registration page, using the provided configuration.
|
public static String getHost(de.samply.common.config.OAuth2Client config, String serverName)
config - Todo.serverName - Todo.public static String getRedirectUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl, Scope... scopes) throws UnsupportedEncodingException
config - the OAuth2 configurationscheme - the scheme (http|https) from the HTTP requestserverName - the server name from the HTTP requestport - the port (80, 443, 8080 ...) from the HTTP requestcontextPath - the context path for the application ("/", "/mdr-gui") from the HTTP
requestredirectUrl - the redirect URL inside the context pathscopes - a list of scopes separated by a whitespaceUnsupportedEncodingException - UnsupportedEncodingExceptionpublic static String getRedirectUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl, String state, Scope... scopes) throws UnsupportedEncodingException
config - the OAuth2 configurationscheme - the scheme (http|https) from the HTTP requestserverName - the server name from the HTTP requestport - the port (80, 443, 8080 ...) from the HTTP requestcontextPath - the context path for the application ("/", "/mdr-gui") from the HTTP
requestredirectUrl - the redirect URL inside the context pathstate - the state parameter used to protect against cross site requests. Use null if
you don't want to use a state parameter.scopes - a list of scopes separated by a whitespaceUnsupportedEncodingException - UnsupportedEncodingExceptionpublic static String getRedirectUrlRegisterPerun(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl, String state, Scope... scopes) throws UnsupportedEncodingException
config - the OAuth2 configurationscheme - the scheme (http|https) from the HTTP requestserverName - the server name from the HTTP requestport - the port (80, 443, 8080 ...) from the HTTP requestcontextPath - the context path for the application ("/", "/mdr-gui") from the HTTP
requestredirectUrl - the redirect URL inside the context pathstate - the state parameter used to protect against cross site requests. Use null if
you don't want to use a state parameter.scopes - a list of scopes separated by a whitespaceUnsupportedEncodingException - UnsupportedEncodingExceptionpublic static String getLocalRedirectUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl)
config - the OAuth2 Configurationscheme - the scheme (http|https)serverName - the server nameport - the port (80, 443, 8080 ...)contextPath - the context path for the application ("/", "/mdr-gui")redirectUrl - the redirect URL inside the context path.String object.public static String getLocalRedirectUrl(String scheme, String serverName, int port, String contextPath, String redirectUrl)
scheme - the scheme (http|https)serverName - the server nameport - the port (80, 443, 8080 ...)contextPath - the context path for the application ("/", "/mdr-gui")redirectUrl - the redirect URL inside the context path.String object.public static String getLogoutUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String localRedirectUrl) throws UnsupportedEncodingException
config - the OAuth2 Configurationscheme - the scheme (http|https)serverName - the server nameport - the port (80, 443, 8080 ...)contextPath - the context path for the application ("/", "/mdr-gui")localRedirectUrl - the redirect URL inside the context path.String object.UnsupportedEncodingException - UnsupportedEncodingExceptionCopyright © 2020 Samply Community. All rights reserved.