Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

oauth2 clientcredentials #90

Merged
merged 10 commits into from
Jul 14, 2023
Merged

Conversation

rizzza
Copy link
Contributor

@rizzza rizzza commented May 30, 2023

Summary

  • oauth2x package to handle viper flags, config, tokensource, and client

Usage

Appconfig will look like this

// OIDCClientConfig stores the configuration for an OIDC client
type OIDCClientConfig struct {
	Client oauth2x.Config
}

var AppConfig struct {
	Events  EventsConfig
	Logging loggingx.Config
	OIDC    OIDCClientConfig
}

and export environment like so

SERVICE_OIDC_CLIENT_ID=someclientid 
SERVICE_OIDC_CLIENT_SECRET=clientsecret  
SERVICE_OIDC_CLIENT_TOKEN_URL=http://iam.dev/token

@rizzza rizzza marked this pull request as draft May 30, 2023 20:18
@rizzza rizzza marked this pull request as ready for review May 30, 2023 20:33
clientcredentialsx/clientcredentials.go Outdated Show resolved Hide resolved
clientcredentialsx/clientcredentials.go Outdated Show resolved Hide resolved
clientcredentialsx/doc.go Outdated Show resolved Hide resolved
clientcredentialsx/auth.go Outdated Show resolved Hide resolved
clientcredentialsx/auth.go Outdated Show resolved Hide resolved
clientcredentialsx/auth.go Outdated Show resolved Hide resolved
clientcredentialsx/auth.go Outdated Show resolved Hide resolved
@rizzza rizzza force-pushed the clientcredentialsx branch 3 times, most recently from 2f80639 to a03a2d3 Compare June 8, 2023 18:00
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
oauth2x/auth.go Outdated Show resolved Hide resolved
oauth2x/auth.go Outdated Show resolved Hide resolved
Signed-off-by: Matt Siwiec <rizzza@users.noreply.github.com>
@nicolerenee nicolerenee added this pull request to the merge queue Jul 14, 2023
Merged via the queue into infratographer:main with commit 02c9028 Jul 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants