File

src/lib/configuration/sz-configuration/sz-configuration.component.ts

Description

Provides a service integration web component(WC) that can be used to set, read, change, and API configuration parameters used through all components.

For Angular implementations we recommend using SzConfigurationService as an injectable as it provides the more robust solution.

Example :
<!-- (WC) SzConfigurationComponent Example - javascript -->
<sz-wc-configuration id="sz-api-conf"></sz-wc-configuration>
document.getElementById('sz-api-conf').basePath = 'http://apis.mydomain.com';
Example :
<!-- (WC) SzConfigurationComponent Example - By attribute -->
<sz-wc-configuration base-path="http://apis.mydomain.com/api"></sz-wc-configuration>

Metadata

Index

Inputs
Outputs
Accessors

Constructor

constructor(apiConfigService: SzConfigurationService)
Parameters :
Name Type Optional
apiConfigService SzConfigurationService No

Inputs

accessToken
Type : string |
additionalHeaders
Type : literal type | string

set additional http/https request headers to be added by default to all outbound api server requests. most commonly used for adding custom or required non-standard headers like jwt session tokens, auth id etc.

apiKeys
Type : literal type

apiKeys to use when connnecting to Api Server

basePath
Type : string

prefix all api requests with this value. most commonly a http or https protocol://hostname:port string that your api server can be accessed through

password
Type : string

password used for challenge respose.

username
Type : string

Username to use when using challenge response authentication.

withCredentials
Type : boolean

whether or not to use CORs for api requests

Outputs

parametersChanged
Type : Subject<SzRestConfiguration>

emmitted when a property has been changed. used mostly for diagnostics.

Accessors

apiKeys
setapiKeys(value: literal type)

apiKeys to use when connnecting to Api Server

Parameters :
Name Type Optional
value literal type No
Returns : void
username
setusername(value: string)

Username to use when using challenge response authentication.

Parameters :
Name Type Optional
value string No
Returns : void
password
setpassword(value: string)

password used for challenge respose.

Parameters :
Name Type Optional
value string No
Returns : void
accessToken
setaccessToken(value: string | )
Parameters :
Name Type Optional
value string | No
Returns : void
basePath
setbasePath(value: string)

prefix all api requests with this value. most commonly a http or https protocol://hostname:port string that your api server can be accessed through

Parameters :
Name Type Optional
value string No
Returns : void
withCredentials
setwithCredentials(value: boolean)

whether or not to use CORs for api requests

Parameters :
Name Type Optional
value boolean No
Returns : void
additionalHeaders
setadditionalHeaders(value: literal type | string)

set additional http/https request headers to be added by default to all outbound api server requests. most commonly used for adding custom or required non-standard headers like jwt session tokens, auth id etc.

Parameters :
Name Type Optional
value literal type | string No
Returns : void

results matching ""

    No results matching ""