IOT Dash
Public Member Functions | List of all members
IotDash.Services.IIdentityService Interface Reference
Inheritance diagram for IotDash.Services.IIdentityService:
Inheritance graph
[legend]

Public Member Functions

Task< AuthResponseRegisterAsync (string username, string password)
 
Task< AuthResponseLoginAsync (string username, string password)
 
Task< AuthResponseRefreshTokenAsync (string token, string refreshToken)
 
Task< int > CleanupRefreshTokens ()
 

Detailed Description

This service provides basic user account functionality.

Member Function Documentation

◆ CleanupRefreshTokens()

Task< int > IotDash.Services.IIdentityService.CleanupRefreshTokens ( )

Delete expired or revoked refresh tokens from the database.

Returns
Number of deleted tokens.

Implemented in IotDash.Services.Implementations.IdentityService.

◆ LoginAsync()

Task< AuthResponse > IotDash.Services.IIdentityService.LoginAsync ( string  username,
string  password 
)

Authenticate a user.

Parameters
usernameUsername of the user.
passwordPassword of the user.
Returns
Result of the authentication.

Implemented in IotDash.Services.Implementations.IdentityService.

◆ RefreshTokenAsync()

Task< AuthResponse > IotDash.Services.IIdentityService.RefreshTokenAsync ( string  token,
string  refreshToken 
)

Authenticate a user from a valid refresh token.

Parameters
tokenAn expired JWT token of the user.
refreshTokenA valid refresh token belonging to the user.
Returns
Result of the authentication.

Implemented in IotDash.Services.Implementations.IdentityService.

◆ RegisterAsync()

Task< AuthResponse > IotDash.Services.IIdentityService.RegisterAsync ( string  username,
string  password 
)

Register new user account, and authenticate the user immediately.

Parameters
usernameUsername of the new user.
passwordPassword of the new user.
Returns
Result of the authentication.

Implemented in IotDash.Services.Implementations.IdentityService.


The documentation for this interface was generated from the following file: