AuthenticationService v0.3.0+17-g647c3a1
Public Member Functions | List of all members
Joutsen.AuthenticationService.v2.TokenController Class Reference

A controller that verifies credentials and issues tokens to authenticated users. More...

Public Member Functions

 TokenController (Authenticator authenticator, AuthenticationConfiguration config, IdEncoding idEncoding, Logger logger)
 Creates a new instance. More...
 
ActionResult Token ([OpenApiIgnore][FromHeader] BasicAuthorizationHeader authorization)
 The endpoint that checks credentials provided by the Authorization header and issues tokens. More...
 
ActionResult Cookie ([FromBody] Credentials credentials, [FromQuery(Name="ref")] String refToken=null)
 The endpoint that checks credentials provided in the body and issues tokens as cookies. More...
 

Detailed Description

A controller that verifies credentials and issues tokens to authenticated users.

Since
0.1.0

Constructor & Destructor Documentation

◆ TokenController()

Joutsen.AuthenticationService.v2.TokenController.TokenController ( Authenticator  authenticator,
AuthenticationConfiguration  config,
IdEncoding  idEncoding,
Logger  logger 
)

Creates a new instance.

Parameters
authenticatorthe instance that can authenticate a user by its name and password
configthe external configuration of the service

Member Function Documentation

◆ Cookie()

ActionResult Joutsen.AuthenticationService.v2.TokenController.Cookie ( [FromBody] Credentials  credentials,
[FromQuery(Name="ref")] String  refToken = null 
)

The endpoint that checks credentials provided in the body and issues tokens as cookies.

Since
Unreleased

◆ Token()

ActionResult Joutsen.AuthenticationService.v2.TokenController.Token ( [FromHeader] BasicAuthorizationHeader  authorization)

The endpoint that checks credentials provided by the Authorization header and issues tokens.