Socket
Book a DemoInstallSign in
Socket

@webex/plugin-authorization-node

Package Overview
Dependencies
Maintainers
8
Versions
1304
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@webex/plugin-authorization-node

latest
Source
npmnpm
Version
3.9.0
Version published
Maintainers
8
Created
Source

@webex/plugin-authorization-node

This package provides authentication functionality for Node.js applications using the Webex SDK.

Install

npm install --save @webex/plugin-authorization-node

Usage

This is a plugin for the Cisco Webex JS SDK. Please see our developer portal and the API docs for full details.

const Webex = require('webex');

const webex = Webex.init({
  credentials: {
    client_id: 'your-client-id',
    client_secret: 'your-client-secret'
  }
});

// Exchange authorization code for access token
webex.authorization.requestAuthorizationCodeGrant({
  code: 'authorization-code'
}).then(() => {
  console.log('Authentication successful');
});

// Use JWT for authentication
webex.authorization.requestAccessTokenFromJwt({
  jwt: 'your-jwt-token'
}).then(() => {
  console.log('JWT authentication successful');
});

// Create JWT token
webex.authorization.createJwt({
  issuer: 'guest-issuer-id',
  secretId: 'base64-encoded-secret',
  displayName: 'Guest User',
  expiresIn: '12h'
}).then(({jwt}) => {
  console.log('JWT created:', jwt);
});

Methods

requestAuthorizationCodeGrant(options)

Exchanges an authorization code for an access token.

  • options.code - The authorization code received from the provider

requestAccessTokenFromJwt(options)

Requests access token using JWT.

  • options.jwt - JWT token for authentication

createJwt(options)

Creates a JWT token.

  • options.issuer - Guest issuer ID
  • options.secretId - Base64 encoded secret
  • options.displayName - Display name (optional)
  • options.expiresIn - Token expiration time

logout(options)

Logs out the current user.

  • options.token - Token to invalidate (optional)

Properties

isAuthorizing

Boolean indicating if authorization is in progress.

isAuthenticating

Alias for isAuthorizing.

Maintainers

This package is maintained by Cisco Webex for Developers.

Contribute

Pull requests welcome. Please see CONTRIBUTING.md for more details.

License

© 2016-2025 Cisco and/or its affiliates. All Rights Reserved.

FAQs

Package last updated on 09 Sep 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts