Skip to content

Commit ed55661

Browse files
committed
chore: Update Hugo version to 0.139.0, adjust Docker image tags to 1.1.0, and modify last modified dates in documentation
1 parent f33208f commit ed55661

File tree

9 files changed

+95
-45
lines changed

9 files changed

+95
-45
lines changed

.github/workflows/hugo.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
build:
3232
runs-on: ubuntu-latest
3333
env:
34-
HUGO_VERSION: 0.108.0
34+
HUGO_VERSION: 0.139.0
3535
steps:
3636
- name: Install Hugo CLI
3737
run: |

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
name: Build
3434
runs-on: ubuntu-latest
3535
env:
36-
HUGO_VERSION: 0.108.0
36+
HUGO_VERSION: 0.139.0
3737

3838
steps:
3939
- name: Checkout

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,21 @@
2727
1. Clone the repository
2828
2. Run the following command to build the docker image
2929
```bash
30-
docker build -t genocs/genocs-library-docs .
30+
docker build -t genocs/genocs-library-docs:1.1.0 .
3131
```
3232
3. Run the following command to run the docker image
3333
```bash
34-
docker run -d -p 1313:80 genocs/genocs-library-docs
34+
docker run -d -p 1313:80 genocs/genocs-library-docs:1.1.0
3535
```
3636
4. Navigate to localhost:1313 to view the documentation
3737

3838
5. push the image to docker hub
3939
```bash
4040
docker login
41-
docker tag genocs/genocs-library-docs genocs/genocs-library-docs:1.0.0
41+
docker tag genocs/genocs-library-docs genocs/genocs-library-docs:1.1.0
4242
docker tag genocs/genocs-library-docs genocs/genocs-library-docs:latest
4343

44-
docker push genocs/genocs-library-docs:1.0.0
44+
docker push genocs/genocs-library-docs:1.1.0
4545
docker push genocs/genocs-library-docs:latest
4646
```
4747

content/en/library/authentication/index.md

Lines changed: 31 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title : "Authentication - JWT"
33
description: "Adds the integration with JWT using an available authentication middleware and system components to validate and grant the access tokens."
44
lead: ""
55
date: 2023-05-13T15:40:19+02:00
6-
lastmod: 2024-11-17T00:00:00+02:00
6+
lastmod: 2024-11-30T00:00:00+02:00
77
draft: false
88
images: []
99
menu:
@@ -166,10 +166,35 @@ The default section name for the JWT settings is `jwt`. The following options ar
166166
- `certificate` - Certificate used to issue or just validate the tokens (including private key or just the public one).
167167
- `algorithm` - The algorithm used to sign the tokens.
168168
- `issuer` - A party signing the tokens.
169+
- `issuerSigningKey` - A key used to sign the tokens.
170+
- `validIssuer` - An issuer that can use the access tokens.
171+
- `authority` - The URL of the OpenId provider.
172+
- `audience` - An audience that can use the access tokens.
173+
- `challenge` - The challenge used to authenticate the user.
174+
- `metadataAddress` - The URL of the OpenId provider metadata.
175+
- `saveToken` - If true then the token will be saved in the authentication properties.
176+
- `saveSigninToken` - If true then the token will be saved in the sign-in properties.
177+
- `requireAudience` - If true then the audience defined in validAudience will be required.
178+
- `requireHttpsMetadata` - If true then the metadata address will be required to use HTTPS.
179+
- `requireExpirationTime` - If true then the expiration time will be required.
180+
- `requireSignedTokens` - If true then the tokens will be required to be signed.
181+
- `expiryMinutes` - How long the token will remain valid.
169182
- `secretKey` - A secret key used to create the access tokens (instead of using the certificate).
170183
- `expiry` - How long the token will remain valid.
171184
- `validateLifetime` - If true then the lifetime defined in expiryMinutes will be validated.
172185
- `validAudience` - An audience that can use the access tokens.
186+
- `validAudiences` - A list of audiences that can use the access tokens.
187+
- `validIssuer` - An issuer that can use the access tokens.
188+
- `validIssuers` - A list of issuers that can use the access tokens.
189+
- `validateActor` - If true then the actor will be validated.
190+
- `validateIssuer` - If true then the issuer defined in validIssuer will be validated.
191+
- `validateTokenReplay` - If true then the token replay will be validated.
192+
- `validateIssuerSigningKey` - If true then the issuer signing key will be validated.
193+
- `refreshOnIssuerKeyNotFound` - If true then the issuer key will be refreshed.
194+
- `includeErrorDetails` - If true then the error details will be included.
195+
- `authenticationType` - The type of the authentication.
196+
- `nameClaimType` - The type of the name claim.
197+
- `roleClaimType` - The type of the role claim.
173198
- `validateAudience` - If true then the audience defined in validAudience will be validated.
174199

175200
## Settings
@@ -180,14 +205,8 @@ Use the following settings in the `appsettings.json` file according to your need
180205
"jwt": {
181206
"enabled": true,
182207
"allowAnonymousEndpoints": [
183-
"/api/health",
184-
"/api/health/ready",
185-
"/api/health/live",
186-
"/api/health/alive",
187-
"/api/health/healthz",
188-
"/api/health/healthz/ready",
189-
"/api/health/healthz/live",
190-
"/api/health/healthz/alive"
208+
"/api/healthz",
209+
"/api/alive"
191210
],
192211
"certificate": {
193212
"location": "certs/localhost.pfx",
@@ -204,6 +223,7 @@ Use the following settings in the `appsettings.json` file according to your need
204223
"challenge" : "Bearer",
205224
"metadataAddress" : "/.well-known/openid-configuration",
206225
"saveToken": true,
226+
"saveSigninToken": false,
207227
"requireAudience": true,
208228
"requireHttpsMetadata": true,
209229
"requireExpirationTime": true,
@@ -224,7 +244,7 @@ Use the following settings in the `appsettings.json` file according to your need
224244
"includeErrorDetails" : true,
225245
"authenticationType" : null,
226246
"nameClaimType" : null,
227-
"roleClaimType" : null,
247+
"roleClaimType" : "Role"
228248
}
229249
```
230250

@@ -246,5 +266,6 @@ Default settings for some variable has bee overwritten with the following config
246266
"validateLifetime": true,
247267
"refreshOnIssuerKeyNotFound": true,
248268
"includeErrorDetails": true,
269+
"roleClaimType" : "Role"
249270
}
250271
```

content/en/library/builder/index.md

Lines changed: 48 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title : "Builder"
33
description: "Genocs builder is the entrypoint for the application builder."
44
lead: ""
55
date: 2023-12-20T17:40:19+02:00
6-
lastmod: 2024-11-17T00:00:00+02:00
6+
lastmod: 2024-11-30T00:00:00+02:00
77
draft: false
88
images: []
99
menu:
@@ -27,20 +27,49 @@ dotnet add package Genocs.Core
2727

2828
## Usage
2929

30-
Extend `IServiceCollection` with `AddGenocs(builder.Configuration)` that will get register the required services.
30+
The builder is the entrypoint for the application builder. You can use the `Genocs.Core` builder to setup the application.
3131

32-
This is what you need to do in the `Program.cs` file.
32+
There are two ways to setup the builder:
3333

34-
```csharp
35-
// Create a new WebApplication
36-
var builder = WebApplication.CreateBuilder(args);
34+
1. Extend `WebApplicationBuilder` with `UseGenocs()`
3735

38-
// Get the services
39-
var services = builder.Services;
36+
This is what you need to do in the `Program.cs` file.
4037

41-
// Setup the builder
42-
services.AddGenocs(builder.Configuration);
43-
```
38+
```csharp
39+
// Create a new WebApplication
40+
var builder = WebApplication.CreateBuilder(args);
41+
42+
builder.AddGenocs();
43+
44+
... // Add other services
45+
```
46+
47+
This option will allow you to be able to integrate [Microsoft Aspire](https://learn.microsoft.com/en-us/dotnet/aspire/) effortlessly, as well as, you can add the following services:
48+
49+
```csharp
50+
... // From the above code
51+
builder.AddJwt()
52+
.AddOpenTelemetry()
53+
.AddMongoFast()
54+
.RegisterMongoRepositories(Assembly.GetExecutingAssembly())
55+
.AddApplicationServices()
56+
.Build();
57+
```
58+
59+
2. Extend `IServiceCollection` with `AddGenocs(builder.Configuration)` that will get register the required services.
60+
61+
This is what you need to do in the `Program.cs` file.
62+
63+
```csharp
64+
// Create a new WebApplication
65+
var builder = WebApplication.CreateBuilder(args);
66+
67+
// Get the services
68+
var services = builder.Services;
69+
70+
// Setup the builder
71+
services.AddGenocs(builder.Configuration);
72+
```
4473

4574

4675
> NOTE: By Adding `AddGenocs(builder.Configuration)` you are adding the following services:
@@ -50,12 +79,11 @@ services.AddHealthChecks();
5079

5180
No need to call MapHealthChecks, it is already done for you.
5281

53-
5482
```csharp
5583
// Map the Default Endpoints
5684
// It contains the following endpoints:
5785
// - /
58-
// - /health
86+
// - /healthz
5987
// - /live
6088
app.MapDefaultEndpoints();
6189
```
@@ -90,26 +118,26 @@ builder.Host
90118
.UseAzureKeyVault() // Use Azure Key Vault
91119
.UseLogging(); // Use Serilog
92120
93-
// Get the services
94-
var services = builder.Services;
95121

96122
// Setup the builder
97-
services
98-
.AddGenocs(builder.Configuration) // Setup Genocs builder
123+
builder
124+
.AddGenocs() // Setup Genocs builder
99125
.AddOpenTelemetry() // Add OpenTelemetry
100126
.AddMongoFast() // Add MongoDb
101127
.RegisterMongoRepositories(Assembly.GetExecutingAssembly()) // Register MongoDb Repositories
102128
.AddApplicationServices() // Add Application Services
103129
.Build(); // Build the services
104130
131+
// Get the services
132+
var services = builder.Services;
133+
105134
services.AddCors(); // Add Cors
106135
services.AddControllers().AddJsonOptions(x =>
107136
{
108137
// serialize Enums as strings in api responses (e.g. Role)
109138
x.JsonSerializerOptions.Converters.Add(new JsonStringEnumConverter());
110139
});
111140

112-
113141
var settings = new SecretSettings();
114142
builder.Configuration.GetSection(SecretSettings.Position).Bind(settings);
115143
services.AddSingleton(settings);
@@ -153,6 +181,7 @@ app.UseAuthorization();
153181

154182
app.MapControllers();
155183

184+
// Map the Default Endpoints and Health Checks
156185
app.MapDefaultEndpoints();
157186

158187
// Run the application
@@ -189,7 +218,7 @@ Use the following settings in the `appsettings.json` file according to your need
189218
"app": {
190219
"name": "Service Name",
191220
"service": "service-name",
192-
"instance": "000001",
221+
"instance": "01",
193222
"version": "v1.0",
194223
"displayBanner": true,
195224
"displayVersion": true

layouts/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ <h1>Genocs</h1>
66
<p class="gradient-banner">{{ .Params.sub }}</p>
77
<h2 style="font-weight: 900;">
88
✔️ <b class="code-green">
9-
<a href="https://github.com/Genocs/genocs-library/releases/tag/v6.4.0">v6.4.0</a>
9+
<a href="https://github.com/Genocs/genocs-library/releases/tag/v7.1.0">v7.1.0</a>
1010
</b>
1111
</h2>
1212
</div>

nginx.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ http {
2121
sendfile on;
2222
#tcp_nopush on;
2323
#tcp_nodelay on;
24-
keepalive_timeout 65;
24+
keepalive_timeout 130;
2525
#types_hash_max_size 2048;
2626

2727
include /etc/nginx/conf.d/*.conf;

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,24 @@
3535
},
3636
"devDependencies": {
3737
"@babel/cli": "^7.25",
38-
"@babel/core": "^7.25",
39-
"@babel/preset-env": "^7.25",
38+
"@babel/core": "^7.26",
39+
"@babel/preset-env": "^7.26",
4040
"@fullhuman/postcss-purgecss": "^6.0",
4141
"auto-changelog": "^2.5.0",
4242
"autoprefixer": "^10.4",
4343
"bootstrap": "^5.3",
4444
"clipboard": "^2.0",
45-
"eslint": "^8.54",
45+
"eslint": "^9.16",
4646
"exec-bin": "^1.0.0",
4747
"flexsearch": "^0.7.43",
4848
"highlight.js": "^11.10",
4949
"hugo-installer": "^4.0",
5050
"instant.page": "^5.2",
5151
"katex": "^0.16",
5252
"lazysizes": "^5.3",
53-
"markdownlint-cli": "^0.41.0",
54-
"mermaid": "^10.9",
55-
"node-fetch": "^3.2",
53+
"markdownlint-cli": "^0.43.0",
54+
"mermaid": "^11.4",
55+
"node-fetch": "^3.3",
5656
"postcss": "^8.4",
5757
"postcss-cli": "^10.1",
5858
"purgecss-whitelister": "^2.4",
@@ -61,6 +61,6 @@
6161
"stylelint-config-standard-scss": "^11.0"
6262
},
6363
"otherDependencies": {
64-
"hugo": "0.108.0"
64+
"hugo": "0.139.0"
6565
}
6666
}

theme.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name = "Doks"
22
license = "MIT"
33
licenselink = "https://github.com/h-enk/doks/blob/master/LICENSE"
44
description = "Hugo theme helping you build modern documentation websites that are secure, fast, and SEO-ready — by default."
5-
timeout = 600000
5+
timeout = 1200000
66

77
homepage = "https://github.com/h-enk/doks"
88
demosite = "https://doks.netlify.app"

0 commit comments

Comments
 (0)