Skip to content
rw3iss Auth

M2MFlow

M2MFlow

Defined in: auth-client/src/core/flows/m2m.flow.ts:42

Constructors

Constructor

new M2MFlow(deps): M2MFlow

Defined in: auth-client/src/core/flows/m2m.flow.ts:43

Parameters

deps

FlowDeps

Returns

M2MFlow

Methods

create()

create(body): Promise<CreateM2MClientResponse>

Defined in: auth-client/src/core/flows/m2m.flow.ts:73

POST /admin/m2m-clients — register a machine credential. The response carries the plaintext client_secret — the ONLY time it is ever visible. Surface it once, then drop it.

Parameters

body

CreateM2MClientRequest

Returns

Promise<CreateM2MClientResponse>


get()

get(id): Promise<M2MClientRecord>

Defined in: auth-client/src/core/flows/m2m.flow.ts:59

GET /admin/m2m-clients/{id} — one client row (no secret).

Parameters

id

string

Returns

Promise<M2MClientRecord>


list()

list(): Promise<M2MClientRecord[]>

Defined in: auth-client/src/core/flows/m2m.flow.ts:49

GET /admin/m2m-clients — every non-revoked client. (The server wraps the array as { clients: [...] }; unwrapped here.)

Returns

Promise<M2MClientRecord[]>


revoke()

revoke(id): Promise<void>

Defined in: auth-client/src/core/flows/m2m.flow.ts:88

DELETE /admin/m2m-clients/{id} — soft-revoke. Outstanding service tokens die within their own lifetime (~15m); new grants fail immediately.

Parameters

id

string

Returns

Promise<void>