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 Jul 23, 2024
1 parent 1131668 commit 0550723
Show file tree
Hide file tree
Showing 18 changed files with 1,238 additions and 92 deletions.
4 changes: 2 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"markdown.extension.toc.levels": "2..2",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "explicit"
}
}
}
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
96 changes: 94 additions & 2 deletions services/authentication-service/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,44 @@
"info": {
"title": "Authentication Service",
"version": "1.0.0",
"description": "Authentication microservice",
"description": "Authentication microservice.",
"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 @@ -929,6 +963,7 @@
"description": "The syntax of the request entity is incorrect"
}
},
"deprecated": true,
"requestBody": {
"content": {
"application/json": {
Expand Down Expand Up @@ -1544,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 @@ -1945,7 +2012,6 @@
],
"additionalProperties": false
},
"Function": {},
"AuthRefreshTokenRequest": {
"title": "AuthRefreshTokenRequest",
"type": "object",
Expand Down Expand Up @@ -2254,6 +2320,7 @@
],
"additionalProperties": false
},
"Function": {},
"ForgetPasswordDto": {
"title": "ForgetPasswordDto",
"type": "object",
Expand Down Expand Up @@ -2470,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 0550723

Please sign in to comment.