Skip to content
  • Auto
  • Light
  • Dark
Get Started

Introspect

Introspect
client.Auth.Introspect(ctx) (*FeaturesarrayPermissionsarrayPrincipleIDstringRolesarrayUserIDstringAuthIntrospectResponse, error)
get/api/v1/auth/introspect

Introspect returns the current user's principle_id, user_id and a list of roles, permissions, and enabled features.

Returns
AuthIntrospectResponsestruct

IntrospectResponse contains information about the current user who is authenticated.

Hide ParametersShow Parameters
Featuresarray
optional
[]string

The list of feature flags enabled for the tenant the logged in user belongs to.

Permissionsarray
optional
[]string

The list of permissions that the current logged in user has.

PrincipleIDstring
optional

The principleID of the current logged in user.

Rolesarray
optional
[]string

The list of roles that the current logged in user has.

UserIDstring
optional

The userID of the current logged in user.

Request example Go
package main

import (
  "context"
  "fmt"

  "github.com/stainless-sdks/-go"
  "github.com/stainless-sdks/-go/option"
)

func main() {
  client := conductoronesdk.NewClient(
    option.WithAPIKey("My API Key"),
  )
  response, err := client.Auth.Introspect(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", response.Features)
}
200 Example
{
  "features": [
    "string"
  ],
  "permissions": [
    "string"
  ],
  "principleId": "principleId",
  "roles": [
    "string"
  ],
  "userId": "userId"
}