Socket
Book a DemoInstallSign in
Socket

@rhoas/service-accounts-sdk

Package Overview
Dependencies
Maintainers
5
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rhoas/service-accounts-sdk

RHOAS Service Accounts SDK

latest
Source
npmnpm
Version
1.0.2
Version published
Weekly downloads
8
100%
Maintainers
5
Weekly downloads
 
Created
Source

Service Accounts SDK

RHOAS Service Accounts TypeScript SDK.

Service accounts are a special type of non-human privileged account used to execute applications and run automated services. Service accounts typically will allow you to connect to the services from your applications.

NOTE: Creation of the service account doesn't automatically gives developers priviledge to use it with the service. Please refer to individual service API to see how to add permissions. For example for kafka-instance-sdk check "access-management" APIs.

Getting Started

Install Package

npm install @rhoas/service-accounts-sdk --save

Usage

import { Configuration, DefaultApi} from "@rhoas/service-accounts-sdk";

const accessToken = process.env.CLOUD_API_TOKEN;
const basePath = "https://sso.redhat.com/auth/realms/redhat-external/";

const apiConfig = new Configuration({
  accessToken,
  basePath,
});

const serviceAccountAPI = new ServiceAccountsApi(apiConfig)

serviceAccountAPI.getServiceAccounts().then((data) => {
    console.log(data?.data)
}).catch((err) => {
    console.error(err.message)
})

See ./examples for full example

Security

API is using https://sso.redhat.com for OAuth Authentication. Provided token needs to be AccessToken returned from library like keycloak.js

Keywords

rhoas

FAQs

Package last updated on 11 Apr 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