Skip to content

Commit 92b2e52

Browse files
committed
fixed code formatting configuration
1 parent 2a84643 commit 92b2e52

File tree

17 files changed

+162
-93
lines changed

17 files changed

+162
-93
lines changed

.editorconfig

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,6 @@ insert_final_newline = true
88
max_line_length = 120
99
tab_width = 4
1010

11-
[{*.html,*.js,*.css}]
12-
indent_size = 2
13-
14-
[*.yml]
15-
indent_size = 2
16-
1711
[{*.kt,*.kts}]
1812
ij_kotlin_allow_trailing_comma = true
1913
ij_kotlin_else_on_new_line = false
@@ -45,6 +39,12 @@ trim_trailing_whitespace = false
4539
[gradlew.bat]
4640
end_of_line = crlf
4741

42+
[{*.html,*.js,*.css}]
43+
indent_size = 2
44+
45+
[{*.yml,*.xml}]
46+
indent_size = 2
47+
4848
[{*.bash,*.sh,*.zsh}]
4949
indent_size = 2
5050
tab_width = 2

.github/workflows/dependency-submission.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ concurrency:
66

77
on:
88
push:
9-
branches: [ 'main' ]
9+
branches: [ main ]
1010

1111
permissions:
1212
contents: write

.github/workflows/deployment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ concurrency:
66

77
on:
88
push:
9-
branches: [main]
9+
branches: [ main ]
1010
workflow_dispatch:
1111

1212
jobs:

.github/workflows/detekt.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ concurrency:
66

77
on:
88
push:
9-
branches: [main]
9+
branches: [ main ]
1010
pull_request:
1111

1212
permissions:

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ concurrency:
66

77
on:
88
push:
9-
branches: [main]
9+
branches: [ main ]
1010
pull_request:
1111

1212
permissions:

.idea/codeStyles/Project.xml

Lines changed: 51 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/codeStyles/codeStyleConfig.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

CLAUDE.md

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
44

55
## Project Overview
66

7-
KJWT is a Kotlin Multiplatform library for creating, signing, encrypting, parsing, and validating JWT (RFC 7519), JWS (RFC 7515), and JWE (RFC 7516) tokens across JVM, JavaScript, WebAssembly, and Native platforms.
7+
KJWT is a Kotlin Multiplatform library for creating, signing, encrypting, parsing, and validating JWT (RFC 7519), JWS (
8+
RFC 7515), and JWE (RFC 7516) tokens across JVM, JavaScript, WebAssembly, and Native platforms.
89

910
## Build & Test Commands
1011

@@ -30,46 +31,52 @@ Tests live in `lib/src/commonTest/kotlin/` and run on all platforms.
3031
## Architecture
3132

3233
### Entry Points
34+
3335
- `Jwt.builder()` — create and sign/encrypt tokens
3436
- `Jwt.parser()` — parse and verify tokens
3537

3638
### Key Packages (`lib/src/commonMain/kotlin/co/touchlab/kjwt/`)
3739

38-
| Package | Purpose |
39-
|---|---|
40-
| `algorithm/` | JWS (HMAC, RSA, ECDSA) and JWE algorithm definitions |
41-
| `builder/` | `JwtBuilder` — fluent API for creating tokens |
42-
| `parser/` | `JwtParser` / `JwtParserBuilder` — parsing, verification, claim validation |
43-
| `model/` | `Claims`, `JwtPayload`, `JwtHeader`, `JwtInstance` (sealed Jws/Jwe) |
44-
| `cryptography/` | Key wrapper types for each algorithm |
45-
| `ext/` | Extension functions for builder (`JwtBuilderExt`) and parser (`JwtParserExt`) |
46-
| `serializers/` | kotlinx.serialization adapters (audience, instant, headers) |
47-
| `internal/` | Base64URL and JSON utilities |
48-
| `dsl/` | DSL helpers for claim blocks |
49-
| `exception/` | `JwtException` hierarchy |
40+
| Package | Purpose |
41+
|-----------------|-------------------------------------------------------------------------------|
42+
| `algorithm/` | JWS (HMAC, RSA, ECDSA) and JWE algorithm definitions |
43+
| `builder/` | `JwtBuilder` — fluent API for creating tokens |
44+
| `parser/` | `JwtParser` / `JwtParserBuilder` — parsing, verification, claim validation |
45+
| `model/` | `Claims`, `JwtPayload`, `JwtHeader`, `JwtInstance` (sealed Jws/Jwe) |
46+
| `cryptography/` | Key wrapper types for each algorithm |
47+
| `ext/` | Extension functions for builder (`JwtBuilderExt`) and parser (`JwtParserExt`) |
48+
| `serializers/` | kotlinx.serialization adapters (audience, instant, headers) |
49+
| `internal/` | Base64URL and JSON utilities |
50+
| `dsl/` | DSL helpers for claim blocks |
51+
| `exception/` | `JwtException` hierarchy |
5052

5153
### Platform Crypto Providers
54+
5255
- JVM: `cryptography-provider-jdk`
5356
- JS/WASM: `cryptography-provider-web`
5457
- Apple: `cryptography-provider-apple`
5558
- Linux/MinGW: `cryptography-provider-openssl3`
5659

57-
Providers are registered per-platform; all crypto is delegated to the [cryptography-kotlin](https://github.com/whyoleg/cryptography-kotlin) library.
60+
Providers are registered per-platform; all crypto is delegated to
61+
the [cryptography-kotlin](https://github.com/whyoleg/cryptography-kotlin) library.
5862

5963
### Design Conventions
64+
6065
- All signing and encryption operations are `suspend` functions
6166
- Custom payload types must implement `JwtPayload` and be `@Serializable`
6267
- JWE tokens have 5 parts; JWS tokens have 3 parts
6368
- `alg=none` (unsecured tokens) must be explicitly opted into via `allowUnsecured(true)` on the parser
6469

6570
### Supported Algorithms
71+
6672
- **JWS:** HS256/384/512, RS256/384/512, PS256/384/512, ES256/384/512
6773
- **JWE Key:** RSA-OAEP, RSA-OAEP-256, dir
6874
- **JWE Content:** A128GCM, A192GCM, A256GCM, A128CbcHs256, A192CbcHs384, A256CbcHs512
6975

7076
## Dependencies (via `gradle/libs.versions.toml`)
77+
7178
- Kotlin 2.x with Kotlin Multiplatform
7279
- kotlinx-serialization
7380
- kotlinx-coroutines
7481
- cryptography-kotlin 0.5.0
75-
- For an overview of the API, use the official webpage https://whyoleg.github.io/cryptography-kotlin/api/
82+
- For an overview of the API, use the official webpage https://whyoleg.github.io/cryptography-kotlin/api/

build-logic/src/main/kotlin/kjwt.linting.gradle.kts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,19 @@ subprojects {
6060
mergedDetektReport {
6161
input.from(
6262
input.from +
63-
tasks.withType<ReportMergeTask>()
64-
.asSequence()
65-
.filter { it.name.equals("mergedDetektReport", true) }
66-
.map { it.output }
63+
tasks.withType<ReportMergeTask>()
64+
.asSequence()
65+
.filter { it.name.equals("mergedDetektReport", true) }
66+
.map { it.output }
6767
)
6868
}
6969
mergedDetektXmlReport {
7070
input.from(
7171
input.from +
72-
tasks.withType<ReportMergeTask>()
73-
.asSequence()
74-
.filter { it.name.equals("mergedDetektXmlReport", true) }
75-
.map { it.output }
72+
tasks.withType<ReportMergeTask>()
73+
.asSequence()
74+
.filter { it.name.equals("mergedDetektXmlReport", true) }
75+
.map { it.output }
7676
)
7777
}
7878
}

build.gradle.kts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import kjwt.Projects
2-
31
plugins {
42
// this is necessary to avoid the plugins to be loaded multiple times
53
// in each subproject's classloader

0 commit comments

Comments
 (0)