Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Login the user with the provided credentials

Parameters

ParameterExpected TypeDescription
usernamestringUsername of the user to login.
passwordstringPassword of the user to login.



UI Text Box
typenote

Before release 12.10, Blueriq expected the username and password to be in the request parameters of the login request (e.g. http://.../api/v2/login?username=testUser&password=secret). Since release 12.10, the username and password are retrieved from the login request body. For backwards compatibility the login information can still be retrieved from the request parameters as well.

The material theme sends the login information in the request body by default from release 12.10. It is possible to configure the theme to still use the legacy request parameter method of logging in, by configuring the backend module in your theme:

Code Block
languagejs
titleapp.module.ts
    V2BackendModule.forRoot({
      baseUrl: ....,
      legacyLoginWithQueryParams: true,
    }),

Request body

Code Block
languagejs
{
	"username": string,
	"password": string
}

Example Request

Url

Code Block
languagejs
/api/v2/login?username=<username>&password=<password>{
	"username": "testUser",
	"password": "secret"
}

Response

204 No Content, if successful.

401 Unauthorized, if unsuccessful.

...