Skip to content

Commit

Permalink
fix(authentication-service): added idp server controller for login an…
Browse files Browse the repository at this point in the history
…d discovery endpoint

BREAKING CHANGE:
  • Loading branch information
prernagp90 committed Sep 9, 2024
1 parent adccfa5 commit c66c5ac
Show file tree
Hide file tree
Showing 16 changed files with 1,217 additions and 62 deletions.
10 changes: 9 additions & 1 deletion services/authentication-service/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,12 @@ AZURE_AUTH_COOKIE_KEY=

#iv is 12 bit

AZURE_AUTH_COOKIE_IV=
AZURE_AUTH_COOKIE_IV=
#COGNITO
COGNITO_AUTH_CALLBACK_URL=
COGNITO_AUTH_CLIENT_DOMAIN=
COGNITO_AUTH_CLIENT_ID=
COGNITO_AUTH_CLIENT_SECRET=
COGNITO_AUTH_REGION=

API_BASE_URL=
4 changes: 2 additions & 2 deletions services/authentication-service/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"editor.trimAutoWhitespace": true,
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true,
"source.fixAll.eslint": true
"source.organizeImports": "explicit",
"source.fixAll.eslint": "explicit"
},

"files.exclude": {
Expand Down
93 changes: 92 additions & 1 deletion services/authentication-service/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,40 @@
"contact": {}
},
"paths": {
"/.well-known/openid-configuration": {
"get": {
"x-controller-name": "IdentityServerController",
"x-operation-name": "getConfig",
"tags": [
"IdentityServerController"
],
"security": [
{
"HTTPBearer": []
}
],
"description": "To get the openid configuration",
"responses": {
"200": {
"description": "OpenId Configuration",
"content": {}
},
"400": {
"description": "The syntax of the request entity is incorrect."
},
"401": {
"description": "Invalid Credentials."
},
"404": {
"description": "The entity requested does not exist."
},
"422": {
"description": "The syntax of the request entity is incorrect"
}
},
"operationId": "IdentityServerController.getConfig"
}
},
"/active-users/{range}": {
"get": {
"x-controller-name": "LoginActivityController",
Expand Down Expand Up @@ -1545,6 +1579,38 @@
"operationId": "LogoutController.cognitoLogout"
}
},
"/connect/auth": {
"post": {
"x-controller-name": "IdentityServerController",
"x-operation-name": "connectAuth",
"tags": [
"IdentityServerController"
],
"description": "POST Call for idp login",
"responses": {
"200": {
"description": "Token Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TokenResponse"
}
}
}
}
},
"requestBody": {
"content": {
"application/x-www-form-urlencoded": {
"schema": {
"$ref": "#/components/schemas/IdpAuthRequest"
}
}
}
},
"operationId": "IdentityServerController.connectAuth"
}
},
"/google/logout": {
"post": {
"x-controller-name": "LogoutController",
Expand Down Expand Up @@ -1946,7 +2012,6 @@
],
"additionalProperties": false
},
"Function": {},
"AuthRefreshTokenRequest": {
"title": "AuthRefreshTokenRequest",
"type": "object",
Expand Down Expand Up @@ -2255,6 +2320,7 @@
],
"additionalProperties": false
},
"Function": {},
"ForgetPasswordDto": {
"title": "ForgetPasswordDto",
"type": "object",
Expand Down Expand Up @@ -2471,6 +2537,31 @@
],
"additionalProperties": false
},
"IdpAuthRequest": {
"title": "IdpAuthRequest",
"type": "object",
"description": "This is signature for idp authentication request.",
"properties": {
"client_id": {
"type": "string",
"description": "This property is supposed to be a string and is a required field"
},
"client_secret": {
"type": "string",
"description": "This property is supposed to be a string and is a required field"
},
"auth_method": {
"type": "string",
"description": "This property is supposed to be a string and is a required field"
}
},
"required": [
"client_id",
"client_secret",
"auth_method"
],
"additionalProperties": false
},
"loopback.Count": {
"type": "object",
"title": "loopback.Count",
Expand Down
Loading

0 comments on commit c66c5ac

Please sign in to comment.