0.0.65 • Published 10 months ago

@adaas/a-auth v0.0.65

Weekly downloads
-
License
ISC
Repository
github
Last release
10 months ago

A-Auth Authentication SDK for ADAAS SDKs

LTSLatestnpm
v1.0.0v1.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 NameRequiredDescription
ADAAS_API_CREDENTIALS_CLIENT_IDYESYour ADAAS API Credentials Key. Not mandatory in case when it's provided through the code
ADAAS_API_CREDENTIALS_CLIENT_SECRETYESYour ADAAS Api Credentials Secret Not mandatory in case when it's provided through the code
ADAAS_A_AUTH_CONFIG_SDK_VALIDATIONNOAllows to ignore configurations validation
ADAAS_A_AUTH_CONFIG_VERBOSENOAllows to turn off extra library logs
ADAAS_A_AUTH_CONFIG_IGNORE_ERRORSNOAllows to ignore error

Links


0.0.62

10 months ago

0.0.63

10 months ago

0.0.64

10 months ago

0.0.65

10 months ago

0.0.61

11 months ago

0.0.60

11 months ago

0.0.59

11 months ago

0.0.58

11 months ago

0.0.57

11 months ago

0.0.56

11 months ago

0.0.55

11 months ago

0.0.54

11 months ago

0.0.53

11 months ago

0.0.52

11 months ago

0.0.51

11 months ago

0.0.50

11 months ago

0.0.49

11 months ago

0.0.48

11 months ago

0.0.47

11 months ago

0.0.46

11 months ago

0.0.45

11 months ago

0.0.44

11 months ago

0.0.43

11 months ago

0.0.42

11 months ago

0.0.41

11 months ago

0.0.40

11 months ago

0.0.39

11 months ago

0.0.38

11 months ago

0.0.37

12 months ago

0.0.36

12 months ago

0.0.35

12 months ago

0.0.34

12 months ago

0.0.33

12 months ago

0.0.32

12 months ago

0.0.31

12 months ago

0.0.30

12 months ago

0.0.29

12 months ago

0.0.28

12 months ago

0.0.27

12 months ago

0.0.26

12 months ago

0.0.25

12 months ago

0.0.24

12 months ago

0.0.23

1 year ago

0.0.22

1 year ago

0.0.21

1 year ago

0.0.20

1 year ago

0.0.19

1 year ago

0.0.18

1 year ago

0.0.17

1 year ago

0.0.16

1 year ago

0.0.15

1 year ago

0.0.14

1 year ago

0.0.13

1 year ago

0.0.12

1 year ago

0.0.11

1 year ago

0.0.10

1 year ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.2

1 year ago