Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@availity/authorizations-axios

Package Overview
Dependencies
Maintainers
0
Versions
96
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@availity/authorizations-axios

Availity authorizations react logic

  • 8.0.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

@availity/authorizations-axios

A package providing a base authorizations class to help check which permissions a user has.

Version NPM Downloads Dependecy Status

Install

NPM

npm install @availity/authorizations-axios

Yarn

yarn add @availity/authorizations-axios

Configuration

AvAuthorizations uses AvPermissions, and AvRegions from Api-Axios. To configure their default options, AvAuthorizations takes in an options object that is passed onto them.

import AvAuthorizations from '@availity/authorizations-axios';
new AvAuthorizations(config);

Methods

For all methods, if no region is passed in, defaults to current region.

isAuthorized

isAuthorized(permissionId, region) resolves to true or false if the current user has access to this permissionId in this region.

isAnyAuthorized

isAnyAuthorized(permissionIds, region) resolves to true or false if the current user has access to any of these permissionIds in this region.

getPermission

getPermission(permissionId, region) resolves to the permission object for this permissionId in this region.

getPermissions

getPermissions(permissionIds, region) resolves to an array of permission objects for these permissionIds in this region.

getOrganizations

getOrganizations(permissionId, region) resolves to the organizations array for this permissionId, will be empty if not authorized

getPayers

getPayers(permissionId, organizationId, region) will check permissionId for an organization with organizationId and resolve to its resources or an empty array.

Authors

Kasey Powers

License

MIT

FAQs

Package last updated on 23 Oct 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc