1.0.0 • Published 5 years ago
@depabc/oauth-utility5 v1.0.0
oauth-utility
eFrame Authorization Package
USAGE
IOptions
export interface IOptions { url?: string; accessTokenUri?: string; clientId?: string; clientSecret?: string; scopes?: string; query?:any; headers?:string; body?:any; method?:string; }
- clientId : provide username /clientid
- clientSecret : provide passowrd or client secret
grantType : like 'authorization_code','client_credentials'
example
option={ method: 'POST', clientId: 'apicjchdtdstg', clientSecret: 'eeeuhebebebvegtygdbcjlSUBiDthqYVDdmneV3', accessTokenUri : 'https://sso.staging.mypsn.com/as/token.oauth2', grantType: "client_credentials"
};var githubAuth=new ClientOAuth2(option ); let data=await githubAuth.credentials.getToken();
Install
npm install @bechtel/oauth-utility
1.0.0
5 years ago