DestinationConfiguration is a class in the context of Alert Notification service Node client. It is used to trigger the mTLS authentication, Basic authentication or oAuth authentication using the Destination service, you just need to provide the clientID, Client secret, OAuth url, Destination service configuration URL generated from your Destination Service instance (e.g. from a Service Key or Service Binding) and the name of the destination where your Alert Notification credentials are configured. For further information go to Credential Management and select Mutual TLS Authentication with Destination Service option.
Constructor properties
Field
Type
Description
username
string
Client id provided form Destination Service binding
password
string
Client secret provided from Destination Service binding
destinationUrl
string
Destination Service configuration URL provided from Destination Service binding
destinationName
string
Name of configured destination
oAuthTokenUrl
string
OAuth URL to retrieve access token
Methods
Name
Returns
Description
getAuthentication
Promise
Get the authentication from the destination.
@Example
import{DestinationConfiguration}from'@sap_oss/alert-notification-client';constdestinationConfiguration=newDestinationConfiguration({username:'test-certificate',password:'test-privateKey',oAuthTokenUrl:'https://test.oauth.cert.service.com/oauth/token',destinationUrl:'https://destination-configuration.test.com',destinationName:'test-destination'});destinationConfiguration.getAuthentication().then(authentication=>console.log(authentication)).catch(error=>console.log(error));// The current call will print the authentication configured in the destination.'