yowenter / go-kratos-hydra-integration

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ory Hydra/Kratos Integration in Go

Getting Started

  • Startup the containers with the following command:
docker-compose up -d --build
  • Create an OAuth client with the following command:
curl -X POST 'http://localhost:4445/clients' \
-H 'Content-Type: application/json' \
--data-raw '{
  "client_id": "auth-code-client",
  "client_name": "Test OAuth2 Client",
  "client_secret": "secret",
  "grant_types": ["authorization_code", "refresh_token"],
  "redirect_uris": ["http://localhost:4455/dashboard"],
  "response_types": ["code", "id_token"],
  "scope": "openid offline",
  "token_endpoint_auth_method": "client_secret_post",
  "metadata": {"registration": true}
}'

Note: You can turn off registration by setting the registration property to false in the metadata property above.

Ory Hydra/Kratos Integration Flow

alt text

About

License:MIT License


Languages

Language:Go 58.2%Language:HTML 28.9%Language:Makefile 9.2%Language:Dockerfile 3.4%Language:Jsonnet 0.3%