Categorygithub.com/k-narusawa/go-idp
repositorypackage
0.0.0-20240727022848-928be30a2198
Repository: https://github.com/k-narusawa/go-idp.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

go-idp

マイグレーション

migrate -path ./migrations -database "postgres://root:[email protected]:5432/idp_db?sslmode=disable" up

クライアント登録

go run server.go

curl --location 'http://localhost:3846/admin/clients' \
--header 'Content-Type: application/json' \
--data '{
  "client_id": "go-idp",
  "client_secret": "~Ep52-Sp%iQtcEHpSLQ5,LT-,9*HMNfg,7WP",
  "redirect_uris": [
    "http://localhost:3000/api/auth/callback/go-idp"
  ],
  "grant_types": [
    "authorization_code",
    "refresh_token",
    "client_credentials"
  ],
  "response_types": [
    "code"
  ],
  "scopes": [
    "openid",
    "offline"
  ],
  "audience": "go-idp",
  "public": false
}'

トークンの払い出し(authorization_code)

go run server.go

cd sp
npm install
npm run dev

デモサイトにアクセス. http://localhost:3000