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

This commit is contained in:
Stefan Benz 2020-04-30 07:08:30 +02:00 committed by GitHub
parent f818b3461a
commit b52fd090a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)