Constructs an instance of this controller.
This property stores authentication challenge generated when created in getAuthCode()
Creates a JSON Web Token given a valid challenge
is
presented on dHealth Network in a transfer transaction.
Note that a token will only be returned given that a
challenge
is present in the request body and given
that this authentication challenge was attached as a
message in a [possibly encrypted] transfer transaction
on dHealth Network.
The passthrough
flag in NestResponse()
operator permits
to instruct nest to pass on the response cookie onto the
express Response
object.
For details about the options passed to the response.cookie
call, please refer to the cookie
documentation.
A request that contains an authentication challenge.
An express
response object that will be used to attach signed cookies.
Promise
This method generates an authentication cookie depending
on the runtime configuration (dApp), i.e. the cookie will
include a [sub-]domain name and a name that are used to
secure the cookie content.
A cookie is attached to the response which is signed
using the authentication secret from the runtime and
which is restricted to the dApp's domain name. Also, the
cookie is a HTTP-only cookie to prevent cross-site
scripting exploits.
Note that reading the cookie using frontends requires
an additional parameter, often named withCredentials
that will permit to decipher the secure cookie.
The passthrough
flag in NestResponse()
operator permits
to instruct nest to pass on the response cookie onto the
express Response
object.
Promise
Revokes an end-user's access token and refresh token. This
request should be executed to sign-out users in a frontend.
The request is secured using the AuthGuard guard
which attaches a payload
to the request object.
The passthrough
flag in NestResponse()
operator permits
to instruct nest to pass on the response cookie onto the
express Response
object.
For details about the options passed to the response.cookie
call, please refer to the cookie
documentation.
An express
response object that will be used to attach signed cookies.
Promisestatus
boolean property.
Creates a JSON Web Token given a valid refreshToken
is attached to the request headers in the Authorization
header as a Bearer token.
Note that a token will only be returned given that a
refreshToken
matches the refresh token hash (SHA3-256)
of the given account address as attached to the request
in the RefreshGuard middleware/guard.
The passthrough
flag in NestResponse()
operator permits
to instruct nest to pass on the response cookie onto the
express Response
object.
An express
request that contains an authenticated user's authentication payload.
An express
response object that will be used to attach signed cookies.
Promise
Generated using TypeDoc
COMMON
The auth controller of the app. Handles requests about authentication, access tokens and basic profile information requests.
This controller defines the following routes:
/auth/challenge
GET
/auth/token
POST
challenge
in the request body and validates it using AuthService/auth/refresh
GET
/auth/logout
GET
v0.2.0