Constructor
new HttpBasicAuthPropertiesBuilder(appName, loginUrl, logoutUrl)
Parameters:
Name | Type | Description |
---|---|---|
appName |
string | Application name |
loginUrl |
string | Basic auth login end point. |
logoutUrl |
string | Basic auth logout end point. |
- Source:
Extends
Members
(static, readonly) ConnectivityMode
Enum values for HttpBasicAuthPropertiesBuilder#connectivityMode
Properties:
Name | Type | Description |
---|---|---|
Online |
string | Connectivity mode is online |
Offline |
string | Connectivity mode is offline |
Auto |
string | Connectivity mode is auto |
- Source:
Methods
appName(appName) → {RemoteAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
appName |
String | Application name |
- Inherited From:
- Source:
Returns:
autoLoginAllowed(allowed) → {HttpBasicAuthPropertiesBuilder}
This method is for specifying if user is allowed to configure automatic login preference or not. This allows app to control what the user can do in the login screen. If this is set to 'true' value set in HttpBasicAuthPropertiesBuilder#autoLoginDefault will be returned in the challenge for auto login preference. This feature enables user to login without challenge, after first successful login, until session times out or user logs out.
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | if user can be allowed to change the preference for auto login. |
- Source:
Returns:
autoLoginDefault(allowed) → {HttpBasicAuthPropertiesBuilder}
This method sets the default value for automatic login preference. This preference is applicable only when {HttpBasicAuthPropertiesBuilder#autoLoginAllowed} is true
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | default value for auto login preference. |
- Source:
Returns:
build() → {Object}
- Overrides:
- Source:
Returns:
validate and return properties collected.
- Type
- Object
challengeCallback(callback) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
callback |
RemoteAuthPropertiesBuilder~remoteAuthChallengeCallback | Callback to handle credential challenge. |
- Source:
Returns:
collectIdentityDomain(collect) → {HttpBasicAuthPropertiesBuilder}
This is to specify if the user challenge should contain identity domain or not. Defaults to false.
Parameters:
Name | Type | Description |
---|---|---|
collect |
boolean | true to collect identity domain when user is challenged. |
- Source:
Returns:
connectivityMode(mode) → {HttpBasicAuthPropertiesBuilder}
This has effect only when HttpBasicAuthPropertiesBuilder#offlineAuthAllowed is set to 'true'. When set to 'false' will result in an Online login always.
Parameters:
Name | Type | Description |
---|---|---|
mode |
HttpBasicAuthPropertiesBuilder.ConnectivityMode | connectivity mode to be used |
- 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:
identityDomainHeaderName(headerName) → {HttpBasicAuthPropertiesBuilder}
Works only when HttpBasicAuthPropertiesBuilder#passIdentityDomainNameInHeader is set to true. Default value is X-USER-IDENTITY-DOMAIN-NAME.
Parameters:
Name | Type | Description |
---|---|---|
headerName |
string | header name to be used. |
- Source:
Returns:
idleTimeOutInSeconds(timeout) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | seconds after which which idle timeout should kick in when user is idle. After these many seconds timeout callback will be invoked. Note: 'Idle' is not tied to app usage yet. It is based on IDM isValid API invocation. |
- Overrides:
- Source:
Returns:
loginUrl(url) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | Basic auth login end point. |
- 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) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
url |
string | Basic auth logout end point. |
- Source:
Returns:
maxLoginAttempts(attempts) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
attempts |
number | maximum login attempts |
- Source:
Returns:
offlineAuthAllowed(allowed) → {HttpBasicAuthPropertiesBuilder}
Defaults to true. In general, apps want to retrieve headers for secured resource access. Apps can set this to false if they do not want the functionality.
Setting this to true results in credentials being stored offline in secured storage. App will be authenticated against this, when Offline login applies.
No matter what HttpBasicAuthPropertiesBuilder.ConnectivityMode is set, first time login will always be ONLINE. Offline credentials will be cleared if user exceeds the HttpBasicAuthPropertiesBuilder#maxLoginAttempts while logging in.
- When set to false results in ONLINE login always, no matter what HttpBasicAuthPropertiesBuilder.ConnectivityMode is set.
- When set to true and HttpBasicAuthPropertiesBuilder.ConnectivityMode is set to ONLINE. This results in an ONLINE login always.
- When set to true and HttpBasicAuthPropertiesBuilder.ConnectivityMode is set to OFFLINE. This results in OFFLINE login for subsequent attempts. In the case of wrong credentials, an ONLINE login will be attempted after maxLoginAttempts is exceeded.
- When set to true and HttpBasicAuthPropertiesBuilder.ConnectivityMode is set to AUTO. Cookie validity determines the type if subsequent login performed. If cookies are valid, it will be an OFFLINE login, otherwise it will be ONLINE login.
Note: RemoteAuthenticationFlow#getHeaders API depends on this to be able to retrieve the Authorization headers.
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | if offline auth is allowed or not. Defaults to 'true'. |
- Source:
Returns:
passIdentityDomainNameInHeader(pass) → {HttpBasicAuthPropertiesBuilder}
This is to specify whether identity domain is sent as header value as per HttpBasicAuthPropertiesBuilder#identityDomainHeaderName, when set to true, or should be prepended with the user name as identity_domain_name.user_name, when set to false. Default value is false.
Parameters:
Name | Type | Description |
---|---|---|
pass |
boolean | true to pass identity domain in header |
- Source:
Returns:
percentageToIdleTimeout(percentage) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
percentage |
number | percentage of idle timeout before which timeout callback should be invoked. This can be used to alerted user about the upcoming idle timeout in timeout callback |
- Overrides:
- 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
rememberCredentialDefault(allowed) → {HttpBasicAuthPropertiesBuilder}
This method sets the default value for remember credentials preference. This preference is applicable only when {HttpBasicAuthPropertiesBuilder#rememberCredentialsAllowed} is true
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | default value for remember credential preference. |
- Source:
Returns:
rememberCredentialsAllowed(allowed) → {HttpBasicAuthPropertiesBuilder}
This method is for specifying if user is allowed to configure remember credentials preference or not. This allows app to control what the user can do in the login screen. If this is set to 'true' value set in HttpBasicAuthPropertiesBuilder#rememberCredentialDefault will be returned in the challenge for remember password preference.
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | if user can be allowed to change the preference for remembering credential. |
- Source:
Returns:
rememberUsernameAllowed(allowed) → {HttpBasicAuthPropertiesBuilder}
This method is for specifying if user is allowed to configure remember user preference or not. This allows app to control what the user can do in the login screen. If this is set to 'true' value set in HttpBasicAuthPropertiesBuilder#rememberUsernameDefault will be returned in the challenge for remember user preference.
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | if user can be allowed to change the preference for remembering user name . |
- Source:
Returns:
rememberUsernameDefault(allowed) → {HttpBasicAuthPropertiesBuilder}
This method sets the default value for remember user preference. This preference is applicable only when {HttpBasicAuthPropertiesBuilder#rememberUsernameAllowed} is true
Parameters:
Name | Type | Description |
---|---|---|
allowed |
boolean | default value for remember username preference. |
- Source:
Returns:
sessionTimeOutInSeconds(timeout) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | seconds after which which session timeout should kick in. After these many seconds timeout callback will be invoked. |
- Overrides:
- Source:
Returns:
timeoutCallback(callback) → {HttpBasicAuthPropertiesBuilder}
Parameters:
Name | Type | Description |
---|---|---|
callback |
RemoteAuthPropertiesBuilder~timeoutCallback | Callback to handle timeout notifications. |
- Source: