Modify Auth Config

Description

Modify a Nabto Edge Authorization Configuration. The isPublic field requires Administrator credentials. Authorization Configurations can have authType: NONE and JWT.

Request

POST /v1/n5/apps/:appId
{
  isPublic?: boolean,
  name?: string|null,
  authType?: string,
  jwtIssuer?: string|null,
  jwtAudience?: string|null,
  jwtJwksUri?: string|null,
  jwtNabtoIdsClaim?: string|null,
  tags?: {
    [key: string]: string
  }
}

Response

Successful response contains the following JSON formated body:

{
  appId: string,
  organizationId: string,
  isPublic: boolean,
  name: string|null,
  serverKey: string,
  authType: string,
  jwtIssuer?: string|null,
  jwtAudience?: string|null,
  jwtJwksUri?: string|null,
  jwtNabtoIdsClaim?: string|null,
  tags: {
    [key: string]: string
  },
  created: string
}

Response Status codes:

  • 200 on success

Request headers

This request must have the following headers:

  • Authorization: bearer <ApiKey>
  • X-Nabto-Organization: <organizationId>
  • Content-Type: application/json

Example

Request

curl -XPOST "https://api.cloud.nabto.com/v1/n5/apps/:appId" \
  -H "Authorization: Bearer <ApiKey>" \
  -H "X-Nabto-Organization: <OrganizationId>" \
  -H "Content-Type: application/json" \
  -d '{ isPublic: true, name: "friendly name", authType: "NONE", jwtIssuer: "<jwtIssuer>", jwtAudience: "<jwtAudience>", jwtJwksUri: "<jwtJwksUri>", jwtNabtoIdsClaim: "<jwtNabtoIdsClaim>", tags: {"foo": "bar" }}'

Response

{
   appId: "ap-abcdwxyz",
  organizationId: "or-lmnopqrs",
  isPublic: true,
  name: "friendly name",
  serverKey: "sk-4242424242424242",
  authType: "NONE",
  jwtIssuer: "<jwtIssuer>",
  jwtAudience: "<jwtAudience>",
  jwtJwksUri: "<jwtJwksUri>",
  jwtNabtoIdsClaim: "<jwtNabtoIdsClaim>",
  tags: {
    "foo": "bar" 
  },
  created: "2022-10-18T10:17:24.299Z"
}