Skip to main content

Class: UpdateAuthClientInput

api-login/auth/dto/update-auth-client.dto.UpdateAuthClientInput

Input to POST /login/client and PUT /login/client/:id` Contains data to create or modify a auth client

Hierarchy

Constructors

constructor

new UpdateAuthClientInput()

Properties

clientCredentialFlowUser

Optional clientCredentialFlowUser: string

The user to use as subject for the client credential flow.

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:53


isValid

Optional isValid: boolean

If given, sets the validity flag of the auth client.

Defaults to true on create

Example

true

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:32


name

Optional name: string

The name to set for the auth client.

If given, must be non empty

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:15


redirectUrls

Optional redirectUrls: string[]

A list of url strings containing at least one url. These are the URLs the oauth autorize endpoint will redirect back to

Defaults to [] on create

Example

["https://example.com/oauth/callback?query=value"]

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:24


requiresSecret

Optional requiresSecret: boolean

If given, setns the need for the client to authenticate using a secret

Defaults to true on create

Example

false

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:40


validScopes

Optional validScopes: TokenScope[]

The list of scopes that this client is allowed to request.

Defaults to [] on create

Example

["backend"]

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:48

Methods

check

Static check(input): UpdateAuthClientInput

Checks a given CreateOrUpdateAuthClientInput for validity.

Valid, if:

  • name is not given or a non empty string matching /^[a-zA-Z0-9+/-_= ]+$/g
  • redirectUrls is not given or an array of at least one url
  • isValid is not given or a boolean
  • requiresSecret is not given or a boolean
  • validScopes is not given or an array of strings containing only TokenScope.BACKEND and TokenScope.LOGIN_SERVICE
  • clientCredentialFlowUser is not given or a string (does not check that the user exists)

Parameters

NameTypeDescription
inputUpdateAuthClientInputThe input instance to check

Returns

UpdateAuthClientInput

The given instance unchanged

Defined in

gropius-login-service/backend/src/api-login/auth/dto/update-auth-client.dto.ts:68