Skip to content

Commit

Permalink
version bump
Browse files Browse the repository at this point in the history
Signed-off-by: Tóth István Zoltán <[email protected]>
  • Loading branch information
toth-istvan-zoltan committed Feb 10, 2023
1 parent e81c03d commit 021f168
Show file tree
Hide file tree
Showing 6 changed files with 35 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .idea/misc.xml

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

2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/zakadabar/gradle/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
package zakadabar.gradle

object Versions {
const val zakadabar = "2023.1.10-SNAPSHOT"
const val zakadabar = "2023.2.10-SNAPSHOT"

val isSnapshot = zakadabar.contains("SNAPSHOT")

Expand Down
3 changes: 2 additions & 1 deletion doc/changelog/TOC.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
* [2023.1.9](./archive/2023.1.9.md)
* [2023.2.10](./archive/2023.2.10.md)
* [Archive]()
* [2023.2.10](./archive/2023.2.10.md)
* [2023.1.9](./archive/2023.1.9.md)
* [2022.12.13](./archive/2022.12.13.md)
* [2022.11.9](./archive/2022.11.9.md)
Expand Down
11 changes: 11 additions & 0 deletions doc/changelog/archive/2023.2.10.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 2023.2.10

## Legend

Changes with marker **very low** and such are technically breaking changes. However, they are
not major modifications and in most cases they should not break anything. Notes after the marker
are the places worth to check. If you extended them you may have to apply the change to your own class also.

## Lib: Account

- add OAuth authentication and registration
1 change: 1 addition & 0 deletions doc/guides/TOC.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
* [Introduction](./libraries/accounts/Introduction.md)
* [Use](./libraries/accounts/Use.md)
* [Sessions](./libraries/accounts/Sessions.md)
* [OAuth](./libraries/accounts/Oauth.md)
* [Blobs]()
* [Introduction](./libraries/blobs/Introduction.md)
* [E-mail]()
Expand Down
34 changes: 19 additions & 15 deletions doc/guides/libraries/accounts/Oauth.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
# OAuth2 authentication
# OAuth2 Authentication

This lib supports Oauth2 authentication method with id_token processing.

## configure settings
## Settings

Config section is in the 'lib.accounts.yaml' under the optional 'oauth' key
Config section is in `lib.accounts.yaml` under the optional `oauth` key. See
[ModuleSettings](/lib/accounts/src/commonMain/kotlin/zakadabar/lib/accounts/data/ModuleSettings.kt)
for general information.

### Oauth2 related parameters
- multiple providers are allowed
- claims are mapped to local db AccountPrivate fields

For details see [ModuleSettings](/lib/accounts/src/commonMain/kotlin/zakadabar/lib/accounts/data/ModuleSettings.kt)
Sample yaml section using google's provider:

sample yaml section using google's provider
```yaml
oauth:
-
Expand All @@ -31,24 +33,25 @@ oauth:
fullName: name
email: email
```
- multiple providers are allowed
- claims are mapped to local db AccountPrivate fields
### login and callback endpoints
### Login And Callback Endpoints
Login endpoint:
/api/auth/<name>/login
Browser redirects to provider's authorizationEndpoint.
/api/auth/<name>/callback
Provider redirects back here after authentication.
The provider redirects back here after authentication.
Callback URL with full protocol and host declaration must be registered as allowed redirect_url in the provider.
After successful authentication a session created for authenticated user and the browser redirects again to the root page.
### external app (android app) using this provider
### Using From External App (Android)
login syntax:
Login syntax:
/api/auth/<name>/login?app=<external-app-link>
Expand All @@ -59,8 +62,9 @@ After successful authentication the app with following parameter syntax will ope
Inside the app using sessionKey as cookie name and sessionId as cookie value allows communication in authorized session.
The external-app-link must be in the configuration yaml externalApps list. It can be app-link or deep-link.
### Extra validations
If the project requires additional checking, there is a callback option
### Extra Validations
If the project requires additional checking, there is a callback option:
```kotlin
val authBl by module<AuthProviderBl>()
Expand All @@ -72,4 +76,4 @@ If the project requires additional checking, there is a callback option
}
```

This callback be called after processing request and before creating authenticated session.
This callback is called after oauth processing and before creating authenticated session.

0 comments on commit 021f168

Please sign in to comment.