Socket
Book a DemoInstallSign in
Socket

@delysium/sso-api

Package Overview
Dependencies
Maintainers
4
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@delysium/sso-api

Interfaces definition for Delysium SSO apis

1.6.0
latest
Source
npmnpm
Version published
Maintainers
4
Created
Source

@delysium/sso-api

Interfaces for Delysium SSO api.

Installation

🚨 Please make sure to add this NPM token in your .npmrc file: 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.

You can do so by running the following command:

echo "//registry.npmjs.org/:_authToken=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" >> .npmrc
npm i @delysium/sso-api

Usage

import {AuthApi, BodyRequest, Empty, Endpoint, LoginRequest, TokenResponse, UserResponse, AuthEmptyRequest} from "@delysium/sso-api"

// Create a new utility class and implement the API interfaces
class AuthSDK implements AuthApi {
    async getMe(request: AuthEmptyRequest): Promise<UserResponse> {
        const endpoint = Endpoint.ME
        return new Promise((resolve, reject) => {
            // TODO http call
        })
    }

    async login(req: BodyRequest<LoginRequest>): Promise<TokenResponse> {
        const endpoint = Endpoint.LOGIN
        return new Promise((resolve, reject) => {
            // TODO http call
        })
    }

    async logout(req: AuthEmptyRequest): Promise<Empty> {
        const endpoint = Endpoint.LOGOUT
        return new Promise((resolve, reject) => {
            // TODO http call
        })
    }
}
    

Keywords

delysium

FAQs

Package last updated on 09 Jan 2023

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.