1.0.0 • Published 4 years ago

@depabc/oauth-utility v1.0.0

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

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