refact(authmethods): Add top level token type to Authenticate (#2010)

Other parts of the system make use of a "type" field, while the
AuthenticateResponse sets a "token_type" on the response attributes
directly. Rename this field to "type", and move it up to the response
level, to be more consistent with other RPCs.

Also adds a new field to the AuthenticateRequest, "type" which will
replace the "token_type" field over time.
This commit is contained in:
Johan Brandhorst-Satzkorn authored and GitHub committed 2022-04-18 09:26:15 -04:00
1 parent bf9e7874b1
commit 80b2c9230f
15 files changed
+246 -171

No files matched your search

+8
View File
@@ -382,6 +382,10 @@
"type": "object",
"properties": {
"token_type": {
"type": "string",
"description": "This can be \"cookie\" or \"token\". If not provided, \"token\" will be used. \"cookie\" activates a split-cookie method where the token is split partially between http-only and regular cookies in order\nto keep it safe from rogue JS in the browser. Deprecated, use \"type\" instead."
},
"type": {
"type": "string",
"description": "This can be \"cookie\" or \"token\". If not provided, \"token\" will be used. \"cookie\" activates a split-cookie method where the token is split partially between http-only and regular cookies in order\nto keep it safe from rogue JS in the browser."
},
@@ -5434,6 +5438,10 @@
"controller.api.services.v1.AuthenticateResponse": {
"type": "object",
"properties": {
"type": {
"type": "string",
"description": "The type of the token returned. Either \"cookie\" or \"token\"."
},
"attributes": {
"type": "object",
"description": "Valid keys and values depend on the type of Auth Method as well as the command."