feat(cli): added implementation for codeflow with a cli

This commit is contained in:
Stefan Benz 2020-04-29 17:17:11 +02:00
parent f818b3461a
commit 2971f64f55
No known key found for this signature in database
GPG key ID: 9D2FE4EA50BEFE68
7 changed files with 219 additions and 18 deletions

View file

@ -11,6 +11,8 @@ import (
//RelayingParty declares the minimal interface for oidc clients
type RelayingParty interface {
//Client return a standard http client where the token can be used
Client(ctx context.Context, token *oauth2.Token) *http.Client
//AuthURL returns the authorization endpoint with a given state
AuthURL(state string, opts ...AuthURLOpt) string
@ -59,6 +61,7 @@ type Config struct {
CallbackURL string
Issuer string
Scopes []string
Endpoints oauth2.Endpoint
}
type OptionFunc func(RelayingParty)