Skip to content

Commit

Permalink
Merge pull request #16 from barzin144/update-readme
Browse files Browse the repository at this point in the history
Update Readme
  • Loading branch information
barzin144 authored Dec 26, 2024
2 parents fef6588 + 728b786 commit 46976eb
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@

- #### Replace PRIVATE_KEY placeholder in docker-compose.yml with generated private key

```JSON
```YML
webapi:
build: .
ports:
Expand Down Expand Up @@ -79,7 +79,7 @@

Replace volume mount source with generated certificate path in docker-compose.yml

```JSON
```YML
volumes:
- type: bind
source: ./aspnetcore.pfx
Expand All @@ -104,11 +104,11 @@
- #### Add Jwt section to you appsettings.json

```JSON
"Jwt": {
"PublicKey": "PUBLIC_KEY",
"Issuer": "https://localhost:8001",
"Audience": "http://localhost:5010"
}
"Jwt": {
"PublicKey": "PUBLIC_KEY",
"Issuer": "https://localhost:8001",
"Audience": "http://localhost:5010"
}
```

Replace PUBLIC_KEY placeholder with generated public key
Expand All @@ -126,15 +126,15 @@
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
ValidateIssuerSigningKey = true,
ValidIssuer = configuration["Jwt:Issuer"],
ValidAudience = configuration["Jwt:Audience"],
IssuerSigningKey = new RsaSecurityKey(rsa)
};
options.TokenValidationParameters = new TokenValidationParameters
{
ValidateIssuer = true,
ValidateAudience = true,
ValidateLifetime = true,
ValidateIssuerSigningKey = true,
ValidIssuer = configuration["Jwt:Issuer"],
ValidAudience = configuration["Jwt:Audience"],
IssuerSigningKey = new RsaSecurityKey(rsa)
};
});
```

0 comments on commit 46976eb

Please sign in to comment.