feat: Integrate CIE authentication flow
This commit is contained in:
@@ -1496,6 +1496,99 @@
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"CieStartRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"frontend_redirect_uri": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"frontend_redirect_uri"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"CieStartResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"authorization_url": {
|
||||
"type": "string"
|
||||
},
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ok",
|
||||
"authorization_url",
|
||||
"state",
|
||||
"status"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"CieExchangeRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"email": {
|
||||
"type": "string"
|
||||
},
|
||||
"fiscal_code": {
|
||||
"type": "string"
|
||||
},
|
||||
"first_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"issuer": {
|
||||
"type": "string"
|
||||
},
|
||||
"last_name": {
|
||||
"type": "string"
|
||||
},
|
||||
"state": {
|
||||
"type": "string"
|
||||
},
|
||||
"subject": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"state",
|
||||
"issuer",
|
||||
"subject",
|
||||
"fiscal_code"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"CieSessionResponse": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
"auth": {
|
||||
"additionalProperties": true,
|
||||
"type": "object"
|
||||
},
|
||||
"ok": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"status": {
|
||||
"type": "string"
|
||||
},
|
||||
"user_id": {
|
||||
"format": "int64",
|
||||
"type": "integer"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"ok",
|
||||
"status"
|
||||
],
|
||||
"type": "object"
|
||||
},
|
||||
"UpdateModerationRequest": {
|
||||
"additionalProperties": false,
|
||||
"properties": {
|
||||
@@ -1610,7 +1703,110 @@
|
||||
"version": "0.1.0"
|
||||
},
|
||||
"openapi": "3.0.3",
|
||||
"paths": {
|
||||
"paths": {
|
||||
"/api/v1/auth/cie/exchange": {
|
||||
"post": {
|
||||
"description": "Completes CIE bridge exchange after Django RP verifies the identity and posts signed user claims.",
|
||||
"operationId": "AuthController.completeCieLogin",
|
||||
"parameters": [ ],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CieExchangeRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"302": {
|
||||
"description": "Redirect to frontend callback URL with state query parameter."
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
}
|
||||
},
|
||||
"summary": "Complete CIE login",
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/auth/cie/session/{id}": {
|
||||
"get": {
|
||||
"description": "Returns status for CIE login session started by Visione.",
|
||||
"operationId": "AuthController.cieSessionStatus",
|
||||
"parameters": [
|
||||
{
|
||||
"in": "path",
|
||||
"name": "id",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CieSessionResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Current login session status."
|
||||
},
|
||||
"404": {
|
||||
"$ref": "#/components/responses/NotFound"
|
||||
}
|
||||
},
|
||||
"summary": "CIE session status",
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/auth/cie/start": {
|
||||
"post": {
|
||||
"description": "Creates a local CIE login session and returns Django RP authorization URL.",
|
||||
"operationId": "AuthController.startCieLogin",
|
||||
"parameters": [ ],
|
||||
"requestBody": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CieStartRequest"
|
||||
}
|
||||
}
|
||||
},
|
||||
"required": true
|
||||
},
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/CieStartResponse"
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Authorization URL and local state."
|
||||
},
|
||||
"400": {
|
||||
"$ref": "#/components/responses/BadRequest"
|
||||
}
|
||||
},
|
||||
"summary": "Start CIE login",
|
||||
"tags": [
|
||||
"Auth"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/api/v1/admin/areas": {
|
||||
"post": {
|
||||
"description": "Creates a municipal area with GeoJSON boundary.",
|
||||
|
||||
Reference in New Issue
Block a user