(req, res, authMethod)
| 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) |
no test coverage detected