oauth
| Kind | kit |
|---|---|
| Capabilities | net |
| Categories | authentication web |
| Keywords | oauth oauth2 authentication authorization security |
OAuth 2.0 client library for Kit
Files
| File | Description | |
|---|---|---|
.editorconfig | Editor formatting configuration | |
.gitignore | Git ignore rules for build artifacts and dependencies | |
.tool-versions | asdf tool versions (Zig, Kit) | |
LICENSE | MIT license file | |
README.md | This file | |
examples/client-credentials.kit | Example: client credentials | |
examples/github.kit | Example: github | |
kit.toml | Package manifest with metadata and dependencies | |
src/oauth.kit | Note: This module uses Kit's standard Result type (Ok a | Err String). |
tests/oauth.test.kit | Tests for oauth | |
tests/types.test.kit | Tests for types |
Architecture
Authorization Code Flow
Client Credentials Flow
Dependencies
base64
Installation
kit add gitlab.com/kit-lang/packages/kit-oauth.gitUsage
import Kit.OauthLicense
MIT License - see LICENSE for details.
Exported Functions & Types
authorize-url
OAuthConfig -> String -> String
authorize-url-pkce
OAuthConfig -> String -> String -> String
exchange-code
OAuthConfig -> String -> Result TokenResponse String
exchange-code-pkce
OAuthConfig -> String -> String -> Result TokenResponse String
refresh-token
OAuthConfig -> NonEmptyString -> Result TokenResponse String
client-credentials
OAuthConfig -> Result TokenResponse String
get
NonEmptyString -> NonEmptyString -> Result HttpResponse String
post
NonEmptyString -> String -> NonEmptyString -> Result HttpResponse String
github
NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
google
NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
microsoft
NonEmptyString -> NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
discord
NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
slack
NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
gitlab
NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
custom
NonEmptyString -> NonEmptyString -> NonEmptyString -> NonEmptyString -> NonEmptyString -> List String -> OAuthConfig
generate-state
String
is-expired?
TokenResponse -> Int -> Bool