3.2.4 • Published 3 years ago

@edirect/oidc-client v3.2.4

Weekly downloads
146
License
UNLICENSED
Repository
-
Last release
3 years ago

@edirect/oidc-client

The EDirectInsure OpenId Connect Client.

Installation

$ npm i --save @edirect/oidc-client

Usage

(async () => {
  const OidcClient = require('@edirect/oidc-client');
  const oidcClient = await OidcClient({
    grantType: 'GRANT_TYPE',
    baseUrl: 'OIDC_PROVIDER_URL',
    oidcPath: 'OIDC_PROVIDER_PATH',
    clientId: 'YOUR_CLIENT_ID',
    clientSecret: 'YOUR_CLIENT_SECRET',
    redirectUri: 'YOUR_CALLBACK_URL'
  });

  const loginData = {
    username: 'USERNAME',
    password: 'PASSWORD',
  }; // only necessary to password grant type

  const accessTokenSet = await oidcClient
    .getAccessToken(loginData || undefined);
  console.log('\n', { accessTokenSet }, '\n');

  // not applicable to client_credentials grant type
  const refreshTokenSet = await oidcClient
    .getRefreshToken(accessTokenSet);
  console.log('\n', { refreshTokenSet }, '\n');
})()
3.2.2

3 years ago

3.2.4

3 years ago

3.2.3

3 years ago

3.1.2

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

3.0.0

3 years ago

2.0.1

3 years ago

2.0.0

3 years ago

1.1.0

4 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago