Skip to content

isopruefi-frontend v1.0.0


isopruefi-frontend / api/api-client / AuthenticationClient

Class: AuthenticationClient

Defined in: api/api-client.ts:10

Constructors

Constructor

new AuthenticationClient(baseUrl?, http?): AuthenticationClient

Defined in: api/api-client.ts:15

Parameters

baseUrl?

string

http?
fetch

Returns

AuthenticationClient

Properties

jsonParseReviver

protected jsonParseReviver: undefined | (key, value) => any = undefined

Defined in: api/api-client.ts:13

Methods

login()

login(input): Promise\<FileResponse>

Defined in: api/api-client.ts:25

Authenticates a user and returns a JWT token for API access.

Parameters

input

Login

The login credentials containing username and password.

Returns

Promise\<FileResponse>

Authentication successful. Returns JWT access token and refresh token.


processLogin()

protected processLogin(response): Promise\<FileResponse>

Defined in: api/api-client.ts:45

Parameters

response

Response

Returns

Promise\<FileResponse>


processRefresh()

protected processRefresh(response): Promise\<void>

Defined in: api/api-client.ts:155

Parameters

response

Response

Returns

Promise\<void>


processRegister()

protected processRegister(response): Promise\<void>

Defined in: api/api-client.ts:91

Parameters

response

Response

Returns

Promise\<void>


refresh()

refresh(token): Promise\<void>

Defined in: api/api-client.ts:136

Refreshes an expired JWT access token using a valid refresh token.

Parameters

token

JwtToken

The JWT token object containing both the expired access token and valid refresh token.

Returns

Promise\<void>

Token refresh successful. Returns new access and refresh tokens.


register()

register(input): Promise\<void>

Defined in: api/api-client.ts:72

Registers a new user in the system. Admin access required.

Parameters

input

Register

The registration data containing username and password for the new user.

Returns

Promise\<void>

User registered successfully.