Skip to content
Prev Previous commit
Next Next commit
Merge branch 'main' into oauth
  • Loading branch information
kylecarbs committed Apr 19, 2022
commit 917dfef806006082699ce754f3323886c868e60d
10 changes: 10 additions & 0 deletions cli/start.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import (
"github.com/briandowns/spinner"
"github.com/coreos/go-systemd/daemon"
"github.com/google/go-github/v43/github"
"github.com/pion/turn/v2"
"github.com/spf13/cobra"
"golang.org/x/oauth2"
xgithub "golang.org/x/oauth2/github"
Expand Down Expand Up @@ -64,6 +65,7 @@ func start() *cobra.Command {
tlsEnable bool
tlsKeyFile string
tlsMinVersion string
turnRelayAddress string
skipTunnel bool
traceDatadog bool
secureAuthCookie bool
Expand Down Expand Up @@ -607,3 +609,11 @@ func configureGithubOAuth2(accessURL *url.URL, clientID, clientSecret string, al
},
}, nil
}

type datadogLogger struct {
logger slog.Logger
}

func (d *datadogLogger) Log(msg string) {
d.logger.Debug(context.Background(), msg)
}
19 changes: 8 additions & 11 deletions coderd/coderd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,14 @@ type Options struct {
Pubsub database.Pubsub

AgentConnectionUpdateFrequency time.Duration
AccessURL *url.URL
Logger slog.Logger
Database database.Store
Pubsub database.Pubsub

AWSCertificates awsidentity.Certificates
GoogleTokenValidator *idtoken.Validator
GithubOAuth2Config *GithubOAuth2Config

SecureAuthCookie bool
SSHKeygenAlgorithm gitsshkey.Algorithm
AWSCertificates awsidentity.Certificates
AzureCertificates x509.VerifyOptions
GoogleTokenValidator *idtoken.Validator
GithubOAuth2Config *GithubOAuth2Config
ICEServers []webrtc.ICEServer
SecureAuthCookie bool
SSHKeygenAlgorithm gitsshkey.Algorithm
TURNServer *turnconn.Server
}

// New constructs the Coder API into an HTTP handler.
Expand Down
14 changes: 8 additions & 6 deletions coderd/coderdtest/coderdtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,11 @@ import (
)

type Options struct {
AWSInstanceIdentity awsidentity.Certificates
GithubOAuth2Config *coderd.GithubOAuth2Config
GoogleInstanceIdentity *idtoken.Validator
SSHKeygenAlgorithm gitsshkey.Algorithm
AWSCertificates awsidentity.Certificates
AzureCertificates x509.VerifyOptions
GithubOAuth2Config *coderd.GithubOAuth2Config
GoogleTokenValidator *idtoken.Validator
SSHKeygenAlgorithm gitsshkey.Algorithm
}

// New constructs an in-memory coderd instance and returns
Expand Down Expand Up @@ -120,9 +121,10 @@ func New(t *testing.T, options *Options) *codersdk.Client {
Database: db,
Pubsub: pubsub,

AWSCertificates: options.AWSInstanceIdentity,
AWSCertificates: options.AWSCertificates,
AzureCertificates: options.AzureCertificates,
GithubOAuth2Config: options.GithubOAuth2Config,
GoogleTokenValidator: options.GoogleInstanceIdentity,
GoogleTokenValidator: options.GoogleTokenValidator,
SSHKeygenAlgorithm: options.SSHKeygenAlgorithm,
TURNServer: turnServer,
})
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.