Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Implemented reset password tokens #24

Merged
merged 12 commits into from
Feb 27, 2024

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,153 @@
}
}
}
},
"/api/ResetPassword/GenerateResetPasswordToken": {
"post": {
"tags": [
"ResetPassword"
],
"operationId": "GenerateResetPasswordToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenRequestContract"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenResponseContractMessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenResponseContractMessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenResponseContractMessageContract"
}
}
}
}
}
}
},
"/api/ResetPassword/ValidateResetPasswordToken": {
"post": {
"tags": [
"ResetPassword"
],
"operationId": "ValidateResetPasswordToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/ValidateResetPasswordTokenRequestContract"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
}
}
}
}
}
},
"/api/ResetPassword/ConsumeResetPasswordToken": {
"post": {
"tags": [
"ResetPassword"
],
"operationId": "ConsumeResetPasswordToken",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract"
}
},
"application/*+json": {
"schema": {
"$ref": "#/components/schemas/ConsumeResetPasswordTokenRequestContract"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"text/plain": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
},
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
},
"text/json": {
"schema": {
"$ref": "#/components/schemas/MessageContract"
}
}
}
}
}
}
}
},
"components": {
Expand Down Expand Up @@ -429,6 +576,20 @@
}
}
},
"ConsumeResetPasswordTokenRequestContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"token": {
"type": "string",
"nullable": true
},
"password": {
"type": "string",
"nullable": true
}
}
},
"ErrorContract": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -519,6 +680,49 @@
16
]
},
"GenerateResetPasswordTokenRequestContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"expireTimeInSeconds": {
"type": "integer",
"format": "int64"
},
"uniqueIdentity": {
"type": "string",
"nullable": true
}
}
},
"GenerateResetPasswordTokenResponseContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"token": {
"type": "string",
"nullable": true
}
}
},
"GenerateResetPasswordTokenResponseContractMessageContract": {
"title": "MessageContract<GenerateResetPasswordTokenResponseContract>",
"type": "object",
"additionalProperties": false,
"properties": {
"isSuccess": {
"type": "boolean"
},
"error": {
"$ref": "#/components/schemas/ErrorContract"
},
"success": {
"$ref": "#/components/schemas/SuccessContract"
},
"result": {
"$ref": "#/components/schemas/GenerateResetPasswordTokenResponseContract"
}
}
},
"LoginByPersonalAccessTokenRequestContract": {
"type": "object",
"additionalProperties": false,
Expand Down Expand Up @@ -725,6 +929,16 @@
}
}
},
"ValidateResetPasswordTokenRequestContract": {
"type": "object",
"additionalProperties": false,
"properties": {
"token": {
"type": "string",
"nullable": true
}
}
},
"ValidationContract": {
"type": "object",
"additionalProperties": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Platforms>AnyCPU;x64;x86</Platforms>
<Authors>EasyMicroservices</Authors>
<IsPackable>true</IsPackable>
<Version>0.0.0.6</Version>
<Version>0.0.0.8</Version>
<Description>client generated code.</Description>
<Copyright>[email protected]</Copyright>
<PackageTags>microservice,Identity,Identity,client</PackageTags>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ public IdentityContext(IEntityFrameworkCoreDatabaseBuilder builder) : base(build
{
}

//public DbSet<IdentityEntity> Identity { get; set; }

protected override void OnModelCreating(ModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@

<ItemGroup>
<PackageReference Include="EasyMicroservices.Configuration" Version="0.0.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="6.0.26" />
</ItemGroup>

<ItemGroup>
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading