I am able to successfully authenticate using my own customAuthenticator.
I need to use a customAuthenticator as the authenticating back end server requires the request header to have the client_id and client_secret.
Something like this.
headers: {
"Authorization": "Basic " + btoa(credentials.client_id + ":" +
credentials.client_secret) ,
"API-KEY": window.ENV.api_key
},
however i see there are several utility functions inside the simple-auth-oauth2.js files which the authenticate method uses.
Methods like : absolutizeExpirationTime(response.expires_in); scheduleAccessTokenRefresh(response.expires_in, expiresAt, response.refresh_token);
My question is how do i call these methods inside simple-auth-oauth2 from my customAuthenticator.
I dont want to copy these methods into my customAuthenticator file.....