oauthserver

command
v0.4.0-beta.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2025 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package main demonstrates the OAuth plugin with a complete example server.

This example shows: - Setting up an OAuth authorization server - Registering OAuth clients - Protecting endpoints with OAuth scopes - Using the authorization code flow

To test: 1. Run: go run ./examples/oauthserver 2. Visit: http://localhost:8080 3. Click "Start OAuth Flow" to test the authorization code flow 4. Or use curl to test the client credentials flow:

curl -X POST http://localhost:8080/oauth/token \
  -d "grant_type=client_credentials" \
  -d "client_id=demo-client" \
  -d "client_secret=demo-secret" \
  -d "scope=read"

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL