cmd

package
v1.3.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorizationCodeGrantFlow

func AuthorizationCodeGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

func Authorize

func Authorize(clientConfig oauth2.ClientConfig, hc *http.Client) error

func ClientCredentialsGrantFlow

func ClientCredentialsGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

func ImplicitGrantFlow

func ImplicitGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

func JWTBearerGrantFlow

func JWTBearerGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

func LogAction added in v1.3.0

func LogAction(msg string) func(string)

func LogAssertion

func LogAssertion(request oauth2.Request, title string, name string)

func LogAuthMethod

func LogAuthMethod(config oauth2.ClientConfig)

func LogBox added in v1.3.0

func LogBox(title string, msg string, args ...interface{})

func LogError added in v1.3.0

func LogError(err error)

func LogHeader added in v1.3.0

func LogHeader(msg string)

func LogInputData added in v1.3.0

func LogInputData(cc oauth2.ClientConfig)

func LogJson

func LogJson(value interface{})

func LogRequest

func LogRequest(r oauth2.Request)

func LogRequestAndResponse

func LogRequestAndResponse(request oauth2.Request, response interface{})

func LogRequestAndResponseln

func LogRequestAndResponseln(request oauth2.Request, response interface{})

func LogRequestln

func LogRequestln(request oauth2.Request)

func LogResult added in v1.3.0

func LogResult(result interface{})

func LogSection added in v1.3.0

func LogSection(msg string)

func LogTokenPayload

func LogTokenPayload(response oauth2.TokenResponse)

func LogTokenPayloadln

func LogTokenPayloadln(response oauth2.TokenResponse)

func LogWarning added in v1.3.0

func LogWarning(msg string)

func Logfln added in v1.3.0

func Logfln(msg string, args ...interface{})

func Logln added in v1.3.0

func Logln()

func OAuth2Cmd

func OAuth2Cmd() *cobra.Command

func PasswordGrantFlow

func PasswordGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

func PromptBool

func PromptBool(name string) (ret bool)

func PromptForClientConfig

func PromptForClientConfig(client oauth2.ClientConfig, server oauth2.ServerConfig) oauth2.ClientConfig

func PromptMultiStringSlice

func PromptMultiStringSlice(name string, options []string) (ret []string)

func PromptString

func PromptString(name string) (ret string)

func PromptStringSlice

func PromptStringSlice(name string, options []string) (ret string)

func RefreshTokenGrantFlow

func RefreshTokenGrantFlow(clientConfig oauth2.ClientConfig, serverConfig oauth2.ServerConfig, hc *http.Client) error

Types

type Config

type Config struct {
	ClientID                string `json:"client_id"`
	ClientSecret            string `json:"client_secret"`
	OpenIDDiscoveryEndpoint string `json:"openid_discovery_endpoint"`
}

func (Config) ToClientConfig

func (c Config) ToClientConfig() oauth2.ClientConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL