Class: OpenIDConnectPropertiesBuilder

OpenIDConnectPropertiesBuilder(appName, oAuthAuthorizationGrantType, discoveryEndpoint, clientId)

This is the builer for OpenIDConnect. Specifics of this type of authentication is similar to OAuth.

Constructor

new OpenIDConnectPropertiesBuilder(appName, oAuthAuthorizationGrantType, discoveryEndpoint, clientId)

Parameters:
Name Type Description
appName string

Application name

oAuthAuthorizationGrantType OAuthPropertiesBuilder.OAuthAuthorizationGrantType

OAuth grant type to be used.

discoveryEndpoint string

OpenId discovery end point.

clientId string

client id.

Source:

Extends

Methods

appName(appName) → {RemoteAuthPropertiesBuilder}

Parameters:
Name Type Description
appName String

Application name

Inherited From:
Source:
Returns:
Type
RemoteAuthPropertiesBuilder

browserMode(mode) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
mode OAuthPropertiesBuilder.BrowserMode

Browser mode to be used.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

build() → {Object}

Overrides:
Source:
Returns:

validate and return properties collected.

Type
Object

challengeCallback(callback) → {OAuthPropertiesBuilder}

Applicable for 2 legged OAuth flows when user is challenge to collect user credentials.

Parameters:
Name Type Description
callback RemoteAuthPropertiesBuilder~remoteAuthChallengeCallback

Callback to handle credential challenge.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

customAuthHeaders(headers) → {RemoteAuthPropertiesBuilder}

Parameters:
Name Type Description
headers Object.<string, string>

any custom headers. These are returned along with other authentication headers in RemoteAuthenticationFlow#getHeaders()

Inherited From:
Source:
Returns:
Type
RemoteAuthPropertiesBuilder

discoveryEndpoint(url) → {OpenIDConnectPropertiesBuilder}

Parameters:
Name Type Description
url string

OAuth token end point.

Source:
Returns:
Type
OpenIDConnectPropertiesBuilder

enablePKCE(enable) → {OAuthPropertiesBuilder}

This method can be used to enable PKCE for OAuth. PKCE is more secured way of using OAUTH for mobile apps. See this blog

Parameters:
Name Type Description
enable boolean

whether to enable PKCE or not.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

idleTimeOutInSeconds(timeout) → {RemoteAuthPropertiesBuilder}

Deprecated: This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.

Parameters:
Name Type Description
timeout number

seconds after which which idle timeout should kick in when user is idle.

Inherited From:
Deprecated:
  • This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.
Source:
Returns:
Type
RemoteAuthPropertiesBuilder

logoutTimeOutInSeconds(timeout) → {RemoteAuthPropertiesBuilder}

Parameters:
Name Type Description
timeout number

specifiy timeout before which ongoing logout attempt will be aborted.

Inherited From:
Source:
Returns:
Type
RemoteAuthPropertiesBuilder

logoutURL(url) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
url string

OAuth logout URL.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthAuthorizationEndpoint(url) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
url string

authorization end point.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthAuthorizationGrantType(grantType) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
grantType OAuthPropertiesBuilder.OAuthAuthorizationGrantType

authorization end point.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthClientID(clientId) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
clientId string

OAuth client id.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthClientSecret(secret) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
secret string

client secret.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthRedirectEndpoint(url) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
url string

End point to redirect after successful authentication. Typically this is app's URL scheme.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthScope(scopes) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
scopes Array.<string>

OAuth scopes.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

oAuthTokenEndpoint(url) → {OAuthPropertiesBuilder}

Parameters:
Name Type Description
url string

OAuth token end point.

Inherited From:
Source:
Returns:
Type
OAuthPropertiesBuilder

percentageToIdleTimeout(percentage) → {RemoteAuthPropertiesBuilder}

Deprecated: This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.

Parameters:
Name Type Description
percentage number

percentage of idle timeout before which timeout callback should be invoked.

Inherited From:
Deprecated:
  • This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.
Source:
Returns:
Type
RemoteAuthPropertiesBuilder

put(key, value) → {Builder}

Convenience method to add key value pairs of auth settings to properties.

Parameters:
Name Type Description
key string

Authentication property key

value string

Authentication property value

Inherited From:
Source:
Returns:
Type
Builder

sessionTimeOutInSeconds(timeout) → {RemoteAuthPropertiesBuilder}

Deprecated: This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.

Parameters:
Name Type Description
timeout number

seconds after which which session timeout should kick in.

Inherited From:
Deprecated:
  • This is not applicable for all remote authentications. Use method available in builder subclasses where applicable.
Source:
Returns:
Type
RemoteAuthPropertiesBuilder