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) |
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) |
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 ip,
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 ip,
String state,
Scope... scopes)
Constructs the URL to the OAuth2 provider, using the provided configuration.
|
public static String getHost(de.samply.common.config.OAuth2Client config, String serverName)
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
public static String getRedirectUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl, String ip, 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 pathip
- the identifier for the identity provider you want to use. Use null if you don't want to use a specific identity providerscopes
- a list of scopes separated by a whitespaceUnsupportedEncodingException
public static String getRedirectUrl(de.samply.common.config.OAuth2Client config, String scheme, String serverName, int port, String contextPath, String redirectUrl, String ip, 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 pathip
- the identifier for the identity provider you want to use. Use null if you don't want to use a specific identity providerstate
- 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
public 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)
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
Copyright © 2015 Universitätsmedizin Mainz, Abteilung IMBEI. All rights reserved.