Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Repository files navigation

User Management v1

Authentication

Operations related to user authentication, including login, registration, token management, and password resets.

Authenticates a user and provides a JWT token.

POST /api/v1/auth/login

Body parameter

{
  "username": "username",
  "password": "P@$$w0rd"
}

Parameters

Name In Type Required Description
body body LoginRequestDto true none
username body string true The username of the user attempting to log in.
password body string true The password of the user attempting to log in.

Example responses

200 Response

{
  "userId": "string",
  "tokenType": "string",
  "accessToken": "string",
  "accessTokenExpiresIn": 0,
  "refreshToken": "string",
  "refreshTokenExpiresIn": 0
}

Responses

Status Meaning Description Schema
200 OK Success AuthenticationResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
500 Internal Server Error Server Error ProblemDetails
This operation does not require authentication

Refreshes the access token using a refresh token.

POST /api/v1/auth/refresh-token

Body parameter

{
  "refreshToken": "token"
}

Parameters

Name In Type Required Description
body body RefreshTokenRequestDto true none
refreshToken body string true The refresh token used to obtain a new access token.

Example responses

200 Response

{
  "userId": "string",
  "tokenType": "string",
  "accessToken": "string",
  "accessTokenExpiresIn": 0,
  "refreshToken": "string",
  "refreshTokenExpiresIn": 0
}

Responses

Status Meaning Description Schema
200 OK Success AuthenticationResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
500 Internal Server Error Server Error ProblemDetails
This operation does not require authentication

Registers a new user.

POST /api/v1/auth/register

Body parameter

{
  "username": "username",
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd",
  "emailAddress": "username@mail.com"
}

Parameters

Name In Type Required Description
body body RegisterRequestDto true none
username body string true The desired username for the new user account.
password body string true The password for the new user account.
confirmPassword body string true Confirmation of the password to ensure it was entered correctly.
emailAddress body string true The email address for the new user account.

Example responses

200 Response

{
  "userId": "string",
  "tokenType": "string",
  "accessToken": "string",
  "accessTokenExpiresIn": 0,
  "refreshToken": "string",
  "refreshTokenExpiresIn": 0
}

Responses

Status Meaning Description Schema
200 OK Success AuthenticationResponseDto
400 Bad Request Bad Request ValidationProblemDetails
409 Conflict none None
500 Internal Server Error Server Error ProblemDetails
This operation does not require authentication

Requests a password reset for the specified email address.

POST /api/v1/auth/request-reset-password

Body parameter

{
  "emailAddress": "username@mail.com"
}

Parameters

Name In Type Required Description
body body RequestPasswordResetRequestDto true none
emailAddress body string true The email address associated with the user account requesting the password reset.

Responses

Status Meaning Description Schema
200 OK Success Inline
202 Accepted Accepted None
400 Bad Request Bad Request ValidationProblemDetails
500 Internal Server Error Server Error ProblemDetails

Response Schema

This operation does not require authentication

Resets the password using a password reset token.

POST /api/v1/auth/reset-password

Body parameter

{
  "passwordResetToken": "token",
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd"
}

Parameters

Name In Type Required Description
body body ResetPasswordRequestDto true none
passwordResetToken body string true The token provided to the user for password reset.
password body string true The new password the user wants to set.
confirmPassword body string true Confirmation of the new password to ensure it was entered correctly.

Responses

Status Meaning Description Schema
200 OK Success Inline
204 No Content No Content None
400 Bad Request Bad Request ValidationProblemDetails
404 Not Found Not Found None
409 Conflict none None
500 Internal Server Error Server Error ProblemDetails

Response Schema

This operation does not require authentication

Revokes a refresh token to prevent further use.

POST /api/v1/auth/revoke-refresh-token

Body parameter

{
  "refreshToken": "token"
}

Parameters

Name In Type Required Description
body body RefreshTokenRequestDto true none
refreshToken body string true The refresh token used to obtain a new access token.

Responses

Status Meaning Description Schema
200 OK Success Inline
204 No Content No Content None
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
500 Internal Server Error Server Error ProblemDetails

Response Schema

This operation does not require authentication

User

Operations related to the current user's profile, including retrieving and updating personal information.

Updates the current user's password.

PATCH /api/v1/user/password

Body parameter

{
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd"
}

Parameters

Name In Type Required Description
body body ChangePasswordRequestDto true none
password body string true The new password the user wants to set.
confirmPassword body string true Confirmation of the new password to ensure it was entered correctly.

Example responses

200 Response

{
  "userId": "string",
  "username": "string",
  "emailAddress": "string",
  "userRole": "string",
  "createdBy": "string",
  "createdAt": "string",
  "updatedBy": "string",
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK Success UserProfileResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
409 Conflict none None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth

Retrieves the profile information of the currently authenticated user.

GET /api/v1/user

Example responses

200 Response

{
  "userId": "string",
  "username": "string",
  "emailAddress": "string",
  "userRole": "string",
  "createdBy": "string",
  "createdAt": "string",
  "updatedBy": "string",
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK Success UserProfileResponseDto
401 Unauthorized Unauthorized None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth

Updates the current user's profile information.

PUT /api/v1/user

Body parameter

{
  "username": "username",
  "emailAddress": "username@mail.com"
}

Parameters

Name In Type Required Description
body body UpdateUserRequestDto true none
username body string¦null false The new username for the user.
emailAddress body string¦null false The new email address for the user.

Example responses

200 Response

{
  "userId": "string",
  "username": "string",
  "emailAddress": "string",
  "userRole": "string",
  "createdBy": "string",
  "createdAt": "string",
  "updatedBy": "string",
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK Success UserProfileResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
409 Conflict none None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth

User Management

Operations for managing users in the system, listing, updating, and deleting user accounts.

Deletes a user with the specified userId.

DELETE /api/v1/user-management/users/{userId}

Parameters

Name In Type Required Description
userId path string(guid) true The unique identifier for the user.

Responses

Status Meaning Description Schema
200 OK Success Inline
204 No Content No Content None
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Not Found None
500 Internal Server Error Server Error ProblemDetails

Response Schema

To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth ( Scopes: Admin )

Updates the profile information of a user with the specified userId.

PUT /api/v1/user-management/users/{userId}

Body parameter

{
  "username": "username",
  "emailAddress": "username@mail.com"
}

Parameters

Name In Type Required Description
userId path string(guid) true none
body body UpdateUserRequestDto true none
username body string¦null false The new username for the user.
emailAddress body string¦null false The new email address for the user.

Example responses

200 Response

{
  "userId": "string",
  "username": "string",
  "emailAddress": "string",
  "userRole": "string",
  "createdBy": "string",
  "createdAt": "string",
  "updatedBy": "string",
  "updatedAt": "string"
}

Responses

Status Meaning Description Schema
200 OK Success UserProfileResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
404 Not Found Not Found None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth ( Scopes: Admin )

Retrieves a paginated list of users.

GET /api/v1/user-management/users

Parameters

Name In Type Required Description
pageNumber query integer(int32) false The page number to retrieve, starting from 1.
pageSize query integer(int32) false The number of items to include per page.
sortBy query string false The field by which to sort the results.
sortOrder query string false The order in which to sort the results.
searchField query string false The specific field to search within.
searchTerm query string false The term to search for in the results.

Example responses

200 Response

{
  "metadata": {
    "pageNumber": 0,
    "pageSize": 0,
    "pageCount": 0,
    "totalCount": 0,
    "hasMore": true
  },
  "data": [
    {
      "userId": "string",
      "username": "string",
      "emailAddress": "string",
      "userRole": "string",
      "createdBy": "string",
      "createdAt": "string",
      "updatedBy": "string",
      "updatedAt": "string"
    }
  ]
}

Responses

Status Meaning Description Schema
200 OK Success PagedResponseDtoOfUserProfileResponseDto
400 Bad Request Bad Request ValidationProblemDetails
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth ( Scopes: Admin )

Retrieves fields which can be used to search users.

GET /api/v1/user-management/users/searchable-fields

Example responses

200 Response

{
  "fields": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Success QueryFieldsResponseDto
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth ( Scopes: Admin )

Retrieves fields which can be used to sort users.

GET /api/v1/user-management/users/sortable-fields

Example responses

200 Response

{
  "fields": [
    "string"
  ]
}

Responses

Status Meaning Description Schema
200 OK Success QueryFieldsResponseDto
401 Unauthorized Unauthorized None
403 Forbidden Forbidden None
500 Internal Server Error Server Error ProblemDetails
To perform this operation, you must be authenticated by means of one of the following methods: JWTBearerAuth ( Scopes: Admin )

Schemas

ValidationProblemDetails

{
  "errors": {
    "property1": [
      "string"
    ],
    "property2": [
      "string"
    ]
  },
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Properties

Name Type Required Restrictions Description
additionalProperties any false none none
errors object false none none
» additionalProperties [string] false none none
type string¦null false none none
title string¦null false none none
status integer(int32)¦null false none none
detail string¦null false none none
instance string¦null false none none

ProblemDetails

{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}

Properties

Name Type Required Restrictions Description
additionalProperties any false none none
type string¦null false none none
title string¦null false none none
status integer(int32)¦null false none none
detail string¦null false none none
instance string¦null false none none

PagedResponseDtoOfUserProfileResponseDto

{
  "metadata": {
    "pageNumber": 0,
    "pageSize": 0,
    "pageCount": 0,
    "totalCount": 0,
    "hasMore": true
  },
  "data": [
    {
      "userId": "string",
      "username": "string",
      "emailAddress": "string",
      "userRole": "string",
      "createdBy": "string",
      "createdAt": "string",
      "updatedBy": "string",
      "updatedAt": "string"
    }
  ]
}

DTO for paginated responses, including metadata and data for a specific type.

Properties

Name Type Required Restrictions Description
metadata PagedResponseMetadataDto true none Metadata about the pagination, such as total count and current page details.
data [UserProfileResponseDto] true none The data items for the current page.

PagedResponseMetadataDto

{
  "pageNumber": 0,
  "pageSize": 0,
  "pageCount": 0,
  "totalCount": 0,
  "hasMore": true
}

Metadata for paginated responses, providing details about pagination and result set.

Properties

Name Type Required Restrictions Description
pageNumber integer(int32) true none The current page number in the paginated result.
pageSize integer(int32) true none The number of items per page.
pageCount integer(int32) true none The total number of pages available based on the current page size and total count.
totalCount integer(int32) true none The total number of items available across all pages.
hasMore boolean true none Indicates whether there are more pages of data available beyond the current page.

UserProfileResponseDto

{
  "userId": "string",
  "username": "string",
  "emailAddress": "string",
  "userRole": "string",
  "createdBy": "string",
  "createdAt": "string",
  "updatedBy": "string",
  "updatedAt": "string"
}

DTO for user profile information response.

Properties

Name Type Required Restrictions Description
userId string(guid) true none The unique identifier for the user.
username string true none The username of the user.
emailAddress string true none The email address of the user.
userRole string true none The role assigned to the user.
createdBy string true none The username of the person who created the user profile.
createdAt string true none The date and time when the user profile was created.
updatedBy string true none The username of the person who last updated the user profile.
updatedAt string true none The date and time when the user profile was last updated.

QueryFieldsResponseDto

{
  "fields": [
    "string"
  ]
}

DTO for specifying fields that can be used for searching or sorting.

Properties

Name Type Required Restrictions Description
fields [string] true none An array of field names that can be used for search or sorting operations.

UpdateUserRequestDto

{
  "username": "username",
  "emailAddress": "username@mail.com"
}

DTO for updating user information.

Properties

Name Type Required Restrictions Description
username string¦null false none The new username for the user.
emailAddress string¦null false none The new email address for the user.

AuthenticationResponseDto

{
  "userId": "string",
  "tokenType": "string",
  "accessToken": "string",
  "accessTokenExpiresIn": 0,
  "refreshToken": "string",
  "refreshTokenExpiresIn": 0
}

DTO for the authentication response, containing tokens and expiration details.

Properties

Name Type Required Restrictions Description
userId string(guid) true none The unique identifier for the authenticated user.
tokenType string true none The type of token issued (e.g., Bearer).
accessToken string true none The access token issued for the authenticated user.
accessTokenExpiresIn integer(int32) true none The duration in seconds until the access token expires.
refreshToken string true none The refresh token that can be used to obtain a new access token.
refreshTokenExpiresIn integer(int32) true none The duration in seconds until the refresh token expires.

LoginRequestDto

{
  "username": "username",
  "password": "P@$$w0rd"
}

DTO for user login request containing username and password.

Properties

Name Type Required Restrictions Description
username string true none The username of the user attempting to log in.
password string true none The password of the user attempting to log in.

RefreshTokenRequestDto

{
  "refreshToken": "token"
}

DTO for requesting a new access token using a refresh token.

Properties

Name Type Required Restrictions Description
refreshToken string true none The refresh token used to obtain a new access token.

RegisterRequestDto

{
  "username": "username",
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd",
  "emailAddress": "username@mail.com"
}

DTO for user registration request containing username, password, and email address.

Properties

Name Type Required Restrictions Description
username string true none The desired username for the new user account.
password string true none The password for the new user account.
confirmPassword string true none Confirmation of the password to ensure it was entered correctly.
emailAddress string true none The email address for the new user account.

RequestPasswordResetRequestDto

{
  "emailAddress": "username@mail.com"
}

DTO for requesting a password reset, containing the user's email address.

Properties

Name Type Required Restrictions Description
emailAddress string true none The email address associated with the user account requesting the password reset.

ResetPasswordRequestDto

{
  "passwordResetToken": "token",
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd"
}

DTO for resetting a user's password, including the reset token and new password details.

Properties

Name Type Required Restrictions Description
passwordResetToken string true none The token provided to the user for password reset.
password string true none The new password the user wants to set.
confirmPassword string true none Confirmation of the new password to ensure it was entered correctly.

ChangePasswordRequestDto

{
  "password": "P@$$w0rd",
  "confirmPassword": "P@$$w0rd"
}

DTO for changing the user's password.

Properties

Name Type Required Restrictions Description
password string true none The new password the user wants to set.
confirmPassword string true none Confirmation of the new password to ensure it was entered correctly.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages