0.0.20240430 • Published 2 days ago

@maxim_mazurok/gapi.client.verifiedaccess-v1 v0.0.20240430

Weekly downloads
-
License
MIT
Repository
github
Last release
2 days ago

TypeScript typings for Chrome Verified Access API v1

API for Verified Access chrome extension to provide credential verification for chrome devices connecting to an enterprise network For detailed description please check documentation.

Installing

Install typings for Chrome Verified Access API:

npm install @types/gapi.client.verifiedaccess-v1 --save-dev

Usage

You need to initialize Google API client in your code:

gapi.load('client', () => {
  // now we can use gapi.client
  // ...
});

Then load api client wrapper:

gapi.client.load(
  'https://verifiedaccess.googleapis.com/$discovery/rest?version=v1',
  () => {
    // now we can use:
    // gapi.client.verifiedaccess
  }
);
// Deprecated, use discovery document URL, see https://github.com/google/google-api-javascript-client/blob/master/docs/reference.md#----gapiclientloadname----version----callback--
gapi.client.load('verifiedaccess', 'v1', () => {
  // now we can use:
  // gapi.client.verifiedaccess
});

Don't forget to authenticate your client before sending any request to resources:

// declare client_id registered in Google Developers Console
var client_id = '',
  scope = [
    // Verify your enterprise credentials
    'https://www.googleapis.com/auth/verifiedaccess',
  ],
  immediate = true;
// ...

gapi.auth.authorize(
  {client_id: client_id, scope: scope, immediate: immediate},
  authResult => {
    if (authResult && !authResult.error) {
      /* handle successful authorization */
    } else {
      /* handle authorization error */
    }
  }
);

After that you can use Chrome Verified Access API resources:

/*
CreateChallenge API
*/
await gapi.client.verifiedaccess.challenge.create({});

/*
VerifyChallengeResponse API
*/
await gapi.client.verifiedaccess.challenge.verify({});
0.0.20240430

2 days ago

0.0.20240423

11 days ago

0.0.20240409

25 days ago

0.0.20240402

1 month ago

0.0.20240319

2 months ago

0.0.20240305

2 months ago

0.0.20240227

2 months ago

0.0.20240220

2 months ago

0.0.20240213

3 months ago

0.0.20240130

3 months ago

0.0.20240119

4 months ago

0.0.20231128

5 months ago

0.0.20230718

10 months ago

0.0.20230711

10 months ago

0.0.20231107

6 months ago

0.0.20230815

9 months ago

0.0.20230912

8 months ago

0.0.20231031

6 months ago

0.0.20230906

8 months ago

0.0.20230807

9 months ago

0.0.20230921

8 months ago

0.0.20230822

9 months ago

0.0.20230801

9 months ago

0.0.20231001

7 months ago

0.0.20231003

7 months ago

0.0.20231024

6 months ago

0.0.20230516

12 months ago

0.0.20230425

1 year ago

0.0.20230503

1 year ago

0.0.20230622

11 months ago

0.0.20230606

11 months ago

0.0.20230530

11 months ago

0.0.20230404

1 year ago

0.0.20230228

1 year ago

0.0.20230401

1 year ago

0.0.20230413

1 year ago

0.0.20230314

1 year ago

0.0.20230307

1 year ago

0.0.20230322

1 year ago

0.0.20230221

1 year ago

0.0.20230214

1 year ago

0.0.20230131

1 year ago

0.0.20230124

1 year ago

0.0.20230213

1 year ago

0.0.20230117

1 year ago

0.0.20221214

1 year ago

0.0.20221202

1 year ago

0.0.20221101

2 years ago

0.0.20221110

1 year ago

0.0.20221018

2 years ago

0.0.20221004

2 years ago

0.0.20221025

2 years ago

0.0.20220519

2 years ago