Skip to content

Commit

Permalink
fix(authentication-service): change response of signup and forget pas…
Browse files Browse the repository at this point in the history
…sword (#459)

BREAKING CHANGE:
removed response body and changed response code of signup-token and forget-password apis

GH-457
  • Loading branch information
akshatdubeysf authored Jan 13, 2022
1 parent ffa356b commit 9ab48c1
Show file tree
Hide file tree
Showing 25 changed files with 334 additions and 438 deletions.
1 change: 1 addition & 0 deletions packages/core/src/enums/auth-error-keys.enum.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export const enum AuthenticateErrorKeys {
UserDoesNotExist = 'UserDoesNotExist',
PasswordCannotBeChanged = 'PasswordCannotBeChangedForExternalUser',
UserInactive = 'UserInactive',
TokenRevoked = 'TokenRevoked',
TokenMissing = 'TokenMissing',
Expand Down
8 changes: 8 additions & 0 deletions packages/core/src/enums/auth-provider.enum.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
export enum AuthProvider {
INTERNAL = 'internal',
KEYCLOAK = 'keycloak',
GOOGLE = 'google',
FACEBOOK = 'facebook',
APPLE = 'apple',
INSTAGRAM = 'instagram',
}
1 change: 1 addition & 0 deletions packages/core/src/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ export * from './locale-key.enum';
export * from './tenant-status.enum';
export * from './auth-error-keys.enum';
export * from './http-oas.enum';
export * from './auth-provider.enum';
150 changes: 4 additions & 146 deletions services/authentication-service/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -169,15 +169,8 @@
}
],
"responses": {
"200": {
"description": "Success Response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ForgetPasswordResponseDto"
}
}
}
"204": {
"description": "Success Response."
},
"400": {
"description": "The syntax of the request entity is incorrect."
Expand Down Expand Up @@ -683,15 +676,8 @@
"SignupRequestController"
],
"responses": {
"200": {
"description": "Sucess Response.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SignupRequestResponseDto"
}
}
}
"204": {
"description": "Sucess Response."
},
"400": {
"description": "The syntax of the request entity is incorrect."
Expand Down Expand Up @@ -1865,113 +1851,6 @@
"additionalProperties": false,
"x-typescript-type": "Partial<AuthClient>"
},
"User": {
"title": "User",
"type": "object",
"description": "This is signature for user model.",
"properties": {
"deleted": {
"type": "boolean"
},
"deletedOn": {
"type": "string",
"format": "date-time",
"nullable": true
},
"deletedBy": {
"type": "string",
"nullable": true
},
"createdOn": {
"type": "string",
"format": "date-time"
},
"modifiedOn": {
"type": "string",
"format": "date-time"
},
"createdBy": {
"type": "string"
},
"modifiedBy": {
"type": "string"
},
"id": {
"type": "string"
},
"firstName": {
"type": "string"
},
"lastName": {
"type": "string"
},
"middleName": {
"type": "string"
},
"username": {
"type": "string"
},
"email": {
"type": "string"
},
"phone": {
"type": "string",
"pattern": "^\\+?[1-9]\\d{1,14}$"
},
"authClientIds": {
"type": "string"
},
"lastLogin": {
"type": "string",
"format": "date-time"
},
"dob": {
"type": "string",
"format": "date-time"
},
"gender": {
"type": "string",
"description": "This field takes a single character as input in database.\n 'M' for male and 'F' for female.",
"enum": [
"M",
"F",
"O"
]
},
"defaultTenantId": {
"type": "string"
}
},
"required": [
"firstName",
"username"
],
"additionalProperties": false
},
"ForgetPasswordResponseDto": {
"title": "ForgetPasswordResponseDto",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"expiry": {
"type": "number"
},
"email": {
"type": "string"
},
"user": {
"$ref": "#/components/schemas/User"
}
},
"required": [
"code",
"expiry",
"email"
],
"additionalProperties": false
},
"ForgetPasswordDto": {
"title": "ForgetPasswordDto",
"type": "object",
Expand Down Expand Up @@ -2018,27 +1897,6 @@
],
"additionalProperties": false
},
"SignupRequestResponseDto": {
"title": "SignupRequestResponseDto",
"type": "object",
"properties": {
"code": {
"type": "string"
},
"expiry": {
"type": "number"
},
"email": {
"type": "string"
}
},
"required": [
"code",
"expiry",
"email"
],
"additionalProperties": false
},
"SignupRequestDto": {
"title": "SignupRequestDto",
"type": "object",
Expand Down
Loading

0 comments on commit 9ab48c1

Please sign in to comment.