npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@adaas/a-auth

v0.0.65

Published

Nodejs JS/TS SDK to manage authentication with ADAAS SSO using API Credentials

Downloads

89

Readme

A-Auth Authentication SDK for ADAAS SDKs

| LTS | Latest | npm | |---------------|----------|---------------------------| | v1.0.0 | v1.0.1 | @adaas/a-auth |

Table of Contents

Overview

Using the SDKs provided within the ADF (Application Development Framework), ADAAS offers a suite of valuable tools for building applications within the ADAAS ecosystem. By leveraging these libraries, you can create a product-centric system with complete end-to-end control over all digital product development activities, including permissions management, authentication, delivery, analytics, marketing, and more.

Concept

There are 2 ways to use authentication with ADAAS Products and ADAAS SSO.

  1. Act on behalf of user via Application
  2. Act as an application (server-to-server)

The 1st option is needed when it's necessary to do some operations from user perspectives using users' permissions, roles and access. For example, using A-folder, In this case if user is going to create a new folder, or upload document it's important to act on users' behalf. The 2nd option is for the operations where user is not an initiator of the operation. For example if application needs to access user profile, or receive access_token -> then application auth should be used.

Therefore, it's important always to provide application credentials to authenticate an application. And then, optionally pass user token, if operation should be performed on user behalf.

Quick Start

Step 1: Install SDK


cd /your/project/location
adf
npm i @adaas/a-auth

Step 2: Provide Credentials

You can pass credentials through ENV variable or via code:

BASH
# Mandatory
ADAAS_API_CREDENTIALS_CLIENT_ID=ADAAS--client::769e6cb6597b...YOUR_ID...911f3060c161
ADAAS_API_CREDENTIALS_CLIENT_SECRET=ADAAS--secret::5ca6204b...YOUR_SECRET...e90c00a263f4db
In APPLICATION
const ADAAS_API_CREDENTIALS_CLIENT_ID = process.env.ADAAS_API_CREDENTIALS_CLIENT_ID!;
const ADAAS_API_CREDENTIALS_CLIENT_SECRET = process.env.ADAAS_API_CREDENTIALS_CLIENT_SECRET!
ADAAS_A_AUTH_Context.setCredentials(
    ADAAS_API_CREDENTIALS_CLIENT_ID,
    ADAAS_API_CREDENTIALS_CLIENT_SECRET

await ADAAS_A_AUTH_Context.authenticate();

Step 4: Start Using

By installing this app into your application then you will be able to access the ADAAS API or ADAAS products API via SSO

Environment Variables

| Variable Name | Required | Description | |---------------|----------|---------------------------| | ADAAS_API_CREDENTIALS_CLIENT_ID | YES | Your ADAAS API Credentials Key. Not mandatory in case when it's provided through the code | | ADAAS_API_CREDENTIALS_CLIENT_SECRET | YES | Your ADAAS Api Credentials Secret Not mandatory in case when it's provided through the code | | ADAAS_A_AUTH_CONFIG_SDK_VALIDATION | NO | Allows to ignore configurations validation | | ADAAS_A_AUTH_CONFIG_VERBOSE | NO | Allows to turn off extra library logs | | ADAAS_A_AUTH_CONFIG_IGNORE_ERRORS | NO | Allows to ignore error |

Links