Vulos Documentation
  • Identity
    • Welcome to the Vulos Identity Documentation!
    • Quick Start
    • Organizations
    • Scopes and Claims
  • Reference
    • Identity JavaScript SDK
      • The Base Package
        • KYC
          • KycStatus
          • KycInstance
          • KycDetails
          • KycApi
        • Profile
          • UserReference
          • ProfileApi
        • Cache
        • Authentication
          • Application
          • BaseAuth
          • User
          • UserInfo
          • BaseApi
        • Organizations
          • Organization
          • OrganizationMembership
            • OrganizationMembershipWithMetadata
          • OrganizationRole
          • OrganizationApi
      • The Backend Auth Package
        • CodeVerifier
        • BackendAuth
      • The Frontend Auth Package
        • IFrameRefresh
        • StateVerifier
        • FrontendAuth
    • Organization API
      • Organizations
      • Memberships
        • Roles
    • Profile API
    • KYC API
Powered by GitBook
On this page
  • Interfaces
  • SuccessResponse
  • Members
  • user : User
  • apiUrl : string
  • Methods
  • constructor(user, apiUrl)
  • async request(url, method = 'get', data = null, cachePrefix = null)
  1. Reference
  2. Identity JavaScript SDK
  3. The Base Package
  4. Authentication

BaseApi

PreviousUserInfoNextOrganizations

Last updated 3 years ago

Interfaces

SuccessResponse

interface SuccessResponse {
    success: boolean,
    message: string
}

Members

user :

The User that this API is associated with.

apiUrl : string

The base URL of this API.

Methods

constructor(user, apiUrl)

This should only get called by classes that inherit the BaseApi class.

  • apiUrl should be the base API URL.

class SomeVulosIdentityApi extends BaseApi {
    constructor(user, endpoint) {
        super(user, endpoint + '/api/v1/some_api')
    }
}

const someApi = new SomeVulosIdentityApi(user, endpoint)

async request(url, method = 'get', data = null, cachePrefix = null)

Preform an authenticated request to the API.

const response = await someApi.request('endpoint', 'put', { key: 'value' }, 'some:endpoint')

user should be an instance of the object.

User
User