Construct an instance of class.
start validation of the challenge
This property implements list of currently connected clients by storing their challenges. Challenge gets removed from list once client disconnects.
This property permits to log information to the console or in files depending on the configuration. This logger instance can be accessed by extending listeners to use a common log process.
This property implements gateway server which is broadcasts different messages to single or multiple clients.
Contains the full websocket connection URL (including path).
This method handles gateway initialize hook.
Websocket connection param, holds server and client info.
Removes client challenge from list
This method handles connection via websocket with the client.
Additionally, this method will emit the event auth.open
given the
presence of an authentication challenge in the signed request cookies.
UDP datagrap socket used to connect.
HTTP Request forwarded to enable reading signed client cookies.
This method handles closing connection with the client.
After client was disconnected - remove his challenge from list.
In case of a successful validation attempts, i.e. when the challenge
parameter has been found in a recent transfer transaction's message,
a document will be insert in the collection authChallenges
.
Websocket connection param, holds server and client info.
Removes client challenge from list
This method handles auth.close event triggered by client.
This method handles auth.close event, which is getting triggered by validateChallengeScheduler when challenge on chain. Sends auth.complete message to the client.
Emits "auth.complete" event which informs client that token may be queried.
This method handles starting of challenge validation. Gets trigged by "auth.open" emit from handleConnection(). Calls .startCronJob from validateChallengeScheduler.
Contains challenge string
Emits "auth.open" event which triggers validating of the received challenge
Generated using TypeDoc
COMMON
This class extends baseGateway and is responsible for handling authentication requests, running challenge validation and finally allowing the frontend to call the
/auth/token
endpoint.This class defines multiple communication flows:
server to server
using the event emitter (OnEvent)client to server
using websocket channel messages (SubscribeMessage)v0.6.0