Issue Principal Token
Motivation
Issue (create) a new principal token in exchange for valid credentials.
Functional Design
POST /api/v2/apps/{owner}/{app}/auth/login
Headers
Content-Type
application/json
Parameters
owner
string
name of a user who owns the application
app
string
name of an application
Body
JSON object:
Result
200
OK
Returns an access token, see below
400
Bad Request
401
Unauthorized
429
Too may requests, rate limiting
500+
Server errors / service unavailable
Example result 200:
Technical design
Components
pkg/router
URL path handler
~cmp.routerLoginPathHandler~
✅:reads Login and Password from the Body;
sends
APIPath_Auth_Login
request to QueryProcessor;
pkg/processors/query2
IApiPathHandler
implementation for handlingAPIPath_Auth_Login
~cmp.authLoginHandler~
✅using login from the argument, generates pseudo-WSID
makes federation post to registry to issue a token
newQueryProcessorPipeline
: provide API handler forAPIPath_Auth_Login
~cmp.provideAuthLoginHandler~
✅
openapi:
add
/auth/login
to the list of API paths;~cmp.provideAuthLoginPath~
✅add PrincipalToken component schema;
~cmp.principalTokenSchema~
✅
pkg/sys/it
integration test for /login
~it.TestLogin~
✅
Last updated
Was this helpful?