MCPcopy Index your code
hub / github.com/nodeSolidServer/node-solid-server / fromParams

Method fromParams

lib/requests/login-request.mjs:17–32  ·  view source on GitHub ↗
(req, res, authMethod)

Source from the content-addressed store, hash-verified

15 }
16
17 static fromParams (req, res, authMethod) {
18 const options = AuthRequest.requestOptions(req, res)
19 options.authMethod = authMethod
20 switch (authMethod) {
21 case PASSWORD_AUTH:
22 options.authenticator = PasswordAuthenticator.fromParams(req, options)
23 break
24 case TLS_AUTH:
25 options.authenticator = TlsAuthenticator.fromParams(req, options)
26 break
27 default:
28 options.authenticator = null
29 break
30 }
31 return new LoginRequest(options)
32 }
33
34 static get (req, res) {
35 const request = LoginRequest.fromParams(req, res)

Callers 3

getMethod · 0.45
loginPasswordMethod · 0.45
loginTlsMethod · 0.45

Calls 1

requestOptionsMethod · 0.80

Tested by

no test coverage detected