fix: preferred login name (#231)

* fix: add preferred login name to my user sessions and get user info from view

* fix: my user in auth
This commit is contained in:
Livio Amstutz
2020-06-17 16:43:53 +02:00
committed by GitHub
parent 4688543d07
commit e7b139ba2c
15 changed files with 1221 additions and 872 deletions
+129 -1
View File
@@ -138,6 +138,23 @@
]
}
},
"/users/me": {
"get": {
"summary": "User",
"operationId": "GetMyUser",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/v1UserView"
}
}
},
"tags": [
"AuthService"
]
}
},
"/users/me/address": {
"get": {
"operationId": "GetMyUserAddress",
@@ -474,7 +491,6 @@
},
"/users/me/profile": {
"get": {
"summary": "User",
"operationId": "GetMyUserProfile",
"responses": {
"200": {
@@ -1170,6 +1186,12 @@
"sequence": {
"type": "string",
"format": "uint64"
},
"login_name": {
"type": "string"
},
"display_name": {
"type": "string"
}
}
},
@@ -1184,6 +1206,112 @@
}
}
},
"v1UserState": {
"type": "string",
"enum": [
"USERSTATE_UNSPECIFIED",
"USERSTATE_ACTIVE",
"USERSTATE_INACTIVE",
"USERSTATE_DELETED",
"USERSTATE_LOCKED",
"USERSTATE_SUSPEND",
"USERSTATE_INITIAL"
],
"default": "USERSTATE_UNSPECIFIED"
},
"v1UserView": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"state": {
"$ref": "#/definitions/v1UserState"
},
"creation_date": {
"type": "string",
"format": "date-time"
},
"change_date": {
"type": "string",
"format": "date-time"
},
"last_login": {
"type": "string",
"format": "date-time"
},
"password_changed": {
"type": "string",
"format": "date-time"
},
"user_name": {
"type": "string"
},
"first_name": {
"type": "string"
},
"last_name": {
"type": "string"
},
"display_name": {
"type": "string"
},
"nick_name": {
"type": "string"
},
"preferred_language": {
"type": "string"
},
"gender": {
"$ref": "#/definitions/v1Gender"
},
"email": {
"type": "string"
},
"is_email_verified": {
"type": "boolean",
"format": "boolean"
},
"phone": {
"type": "string"
},
"is_phone_verified": {
"type": "boolean",
"format": "boolean"
},
"country": {
"type": "string"
},
"locality": {
"type": "string"
},
"postal_code": {
"type": "string"
},
"region": {
"type": "string"
},
"street_address": {
"type": "string"
},
"sequence": {
"type": "string",
"format": "uint64"
},
"resource_owner": {
"type": "string"
},
"login_names": {
"type": "array",
"items": {
"type": "string"
}
},
"preferred_login_name": {
"type": "string"
}
}
},
"v1VerifyMfaOtp": {
"type": "object",
"properties": {