p := openidClient.NewProvider(
"idp url",
"client name",
"client secret"
)
p.AddScopes("something")
func LoginHandler(w http.ResponseWriter, r *http.Request) {
url := p.GenerateLoginURL("state")
http.Redirect(w, r, url, 302)
}
func CallbackHandler(w http.ResponseWriter, r *http.Request) {
session := p.Exchange("code")
session. AccessToken
session.IDToken
session.RefreshToken
...
}-
Notifications
You must be signed in to change notification settings - Fork 1
alshdavid-labs/openid-client
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
About
OpenID Relying Party (RP, Client) implementation for Go servers
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published