Constructor
new OAuthPropertiesBuilder(appName, oAuthAuthorizationGrantType, oAuthTokenEndpoint, oAuthClientID)
Parameters:
Name | Type | Description |
---|---|---|
appName |
string | Application name |
oAuthAuthorizationGrantType |
OAuthPropertiesBuilder.OAuthAuthorizationGrantType | OAuth authorization grant type. |
oAuthTokenEndpoint |
string | OAuth token end point. |
oAuthClientID |
string | OAuth client id. |
- Source:
Extends
Members
(static, readonly) BrowserMode
Enum values for OAuthPropertiesBuilder#browserMode
Properties:
Name | Type | Description |
---|---|---|
External |
string | Browser mode is external. An external browser will be opened. |
Embedded |
string | Browser mode is embedded. An embedded browser will be opened within the app. |
- Source:
(static, readonly) OAuthAuthorizationGrantType
Enum values for OAuthPropertiesBuilder#oAuthAuthorizationGrantType
Properties:
Name | Type | Description |
---|---|---|
OAuthImplicit |
string | OAuth grant type is implicit |
OAuthAuthorizationCode |
string | OAuth grant type is authorization code |
OAuthResourceOwner |
string | OAuth grant type is resource owner |
OAuthClientCredentials |
string | OAuth grant type is client credentials |
- Source:
Methods
appName(appName) → {RemoteAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
appName |
String | Application name |
- Inherited From:
- Source:
Returns:
browserMode(mode) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
mode |
OAuthPropertiesBuilder.BrowserMode | Browser mode to be used. |
- Source:
Returns:
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. |
- Source:
Returns:
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:
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. |
- Source:
Returns:
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:
logoutTimeOutInSeconds(timeout) → {RemoteAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | specifiy timeout before which ongoing logout attempt will be aborted. |
- Inherited From:
- Source:
Returns:
logoutURL(url) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | OAuth logout URL. |
- Source:
Returns:
oAuthAuthorizationEndpoint(url) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | authorization end point. |
- Source:
Returns:
oAuthAuthorizationGrantType(grantType) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
grantType |
OAuthPropertiesBuilder.OAuthAuthorizationGrantType | authorization end point. |
- Source:
Returns:
oAuthClientID(clientId) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
clientId |
string | OAuth client id. |
- Source:
Returns:
oAuthClientSecret(secret) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
secret |
string | client secret. |
- Source:
Returns:
oAuthRedirectEndpoint(url) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | End point to redirect after successful authentication. Typically this is app's URL scheme. |
- Source:
Returns:
oAuthScope(scopes) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
scopes |
Array.<string> | OAuth scopes. |
- Source:
Returns:
oAuthTokenEndpoint(url) → {OAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | OAuth token end point. |
- Source:
Returns:
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:
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: