#oauth changed GoogleController for the jwt flow ( using a common token if we connect from our app or from google )

This commit is contained in:
Dominic Villemure
2024-06-09 23:44:37 -04:00
parent ac87aeb4c4
commit 6f76cb2084
16 changed files with 338 additions and 842 deletions

View File

@@ -273,75 +273,22 @@
}
}
},
"/api/Users/register": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersRegister",
"requestBody": {
"x-name": "registration",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": ""
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
}
}
}
},
"/api/Users/login": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersLogin",
"parameters": [
{
"name": "useCookies",
"in": "query",
"schema": {
"type": "boolean",
"nullable": true
},
"x-position": 2
},
{
"name": "useSessionCookies",
"in": "query",
"schema": {
"type": "boolean",
"nullable": true
},
"x-position": 3
}
],
"operationId": "Login",
"requestBody": {
"x-name": "login",
"x-name": "command",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LoginRequest"
"$ref": "#/components/schemas/LoginCommand"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
@@ -350,7 +297,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessTokenResponse"
"type": "string"
}
}
}
@@ -358,305 +305,6 @@
}
}
},
"/api/Users/refresh": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersRefresh",
"requestBody": {
"x-name": "refreshRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RefreshRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AccessTokenResponse"
}
}
}
}
}
}
},
"/api/Users/confirmEmail": {
"get": {
"tags": [
"Users"
],
"operationId": "GetApiUsersConfirmEmail",
"parameters": [
{
"name": "userId",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 1
},
{
"name": "code",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 2
},
{
"name": "changedEmail",
"in": "query",
"schema": {
"type": "string",
"nullable": true
},
"x-position": 3
}
],
"responses": {
"200": {
"description": ""
}
}
}
},
"/api/Users/resendConfirmationEmail": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersResendConfirmationEmail",
"requestBody": {
"x-name": "resendRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResendConfirmationEmailRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": ""
}
}
}
},
"/api/Users/forgotPassword": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersForgotPassword",
"requestBody": {
"x-name": "resetRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForgotPasswordRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": ""
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
}
}
}
},
"/api/Users/resetPassword": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersResetPassword",
"requestBody": {
"x-name": "resetRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ResetPasswordRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": ""
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
}
}
}
},
"/api/Users/manage/2fa": {
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersManage2fa",
"requestBody": {
"x-name": "tfaRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TwoFactorRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TwoFactorResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"JWT": []
}
]
}
},
"/api/Users/manage/info": {
"get": {
"tags": [
"Users"
],
"operationId": "GetApiUsersManageInfo",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InfoResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"JWT": []
}
]
},
"post": {
"tags": [
"Users"
],
"operationId": "PostApiUsersManageInfo",
"requestBody": {
"x-name": "infoRequest",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InfoRequest"
}
}
},
"x-position": 1
},
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InfoResponse"
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HttpValidationProblemDetails"
}
}
}
},
"404": {
"description": ""
}
},
"security": [
{
"JWT": []
}
]
}
},
"/api/WeatherForecasts": {
"get": {
"tags": [
@@ -699,14 +347,34 @@
}
},
"/api/google/sign-in": {
"get": {
"post": {
"tags": [
"Google"
],
"operationId": "Google_SignIn",
"requestBody": {
"x-name": "request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GoogleSignInRequest"
}
}
},
"required": true,
"x-position": 1
},
"responses": {
"200": {
"description": ""
"description": "",
"content": {
"application/octet-stream": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
@@ -986,6 +654,18 @@
}
}
},
"LoginCommand": {
"type": "object",
"additionalProperties": false,
"properties": {
"emailAddress": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"MinimalUserDto": {
"type": "object",
"additionalProperties": false,
@@ -1001,231 +681,6 @@
}
}
},
"HttpValidationProblemDetails": {
"allOf": [
{
"$ref": "#/components/schemas/ProblemDetails"
},
{
"type": "object",
"additionalProperties": {
"nullable": true
},
"properties": {
"errors": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
}
]
},
"ProblemDetails": {
"type": "object",
"additionalProperties": {
"nullable": true
},
"properties": {
"type": {
"type": "string",
"nullable": true
},
"title": {
"type": "string",
"nullable": true
},
"status": {
"type": "integer",
"format": "int32",
"nullable": true
},
"detail": {
"type": "string",
"nullable": true
},
"instance": {
"type": "string",
"nullable": true
}
}
},
"RegisterRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
}
}
},
"AccessTokenResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"tokenType": {
"type": "string"
},
"accessToken": {
"type": "string"
},
"expiresIn": {
"type": "integer",
"format": "int64"
},
"refreshToken": {
"type": "string"
}
}
},
"LoginRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"password": {
"type": "string"
},
"twoFactorCode": {
"type": "string",
"nullable": true
},
"twoFactorRecoveryCode": {
"type": "string",
"nullable": true
}
}
},
"RefreshRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"refreshToken": {
"type": "string"
}
}
},
"ResendConfirmationEmailRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
}
}
},
"ForgotPasswordRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
}
}
},
"ResetPasswordRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"resetCode": {
"type": "string"
},
"newPassword": {
"type": "string"
}
}
},
"TwoFactorResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"sharedKey": {
"type": "string"
},
"recoveryCodesLeft": {
"type": "integer",
"format": "int32"
},
"recoveryCodes": {
"type": "array",
"nullable": true,
"items": {
"type": "string"
}
},
"isTwoFactorEnabled": {
"type": "boolean"
},
"isMachineRemembered": {
"type": "boolean"
}
}
},
"TwoFactorRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"enable": {
"type": "boolean",
"nullable": true
},
"twoFactorCode": {
"type": "string",
"nullable": true
},
"resetSharedKey": {
"type": "boolean"
},
"resetRecoveryCodes": {
"type": "boolean"
},
"forgetMachine": {
"type": "boolean"
}
}
},
"InfoResponse": {
"type": "object",
"additionalProperties": false,
"properties": {
"email": {
"type": "string"
},
"isEmailConfirmed": {
"type": "boolean"
}
}
},
"InfoRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"newEmail": {
"type": "string",
"nullable": true
},
"newPassword": {
"type": "string",
"nullable": true
},
"oldPassword": {
"type": "string",
"nullable": true
}
}
},
"WeatherForecast": {
"type": "object",
"additionalProperties": false,
@@ -1247,6 +702,15 @@
"nullable": true
}
}
},
"GoogleSignInRequest": {
"type": "object",
"additionalProperties": false,
"properties": {
"accessToken": {
"type": "string"
}
}
}
},
"securitySchemes": {