From 6fe455c68749ef3302c9959619d5993ffce8454e Mon Sep 17 00:00:00 2001 From: Andrew Keesler Date: Wed, 4 Nov 2020 11:20:03 -0500 Subject: [PATCH] auth_handler.go: comment out currently unused fosite wiring See e8f4336 for why this is here in the first place. Signed-off-by: Andrew Keesler --- internal/oidc/auth/auth_handler.go | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/internal/oidc/auth/auth_handler.go b/internal/oidc/auth/auth_handler.go index 144a8fc19..d46384af9 100644 --- a/internal/oidc/auth/auth_handler.go +++ b/internal/oidc/auth/auth_handler.go @@ -32,16 +32,26 @@ func NewHandler( generateNonce func() (nonce.Nonce, error), ) http.Handler { oauthHelper := compose.Compose( + // Empty Config for right now since we aren't using anything in it. We may want to inject this + // in the future since it has some really nice configuration knobs like token lifetime. &compose.Config{}, + + // This is the thing that matters right now - the store is used to get information about the + // client in the authorization request. oauthStore, - &compose.CommonStrategy{ - // Shouldn't need any of this - we aren't doing auth code stuff, issuing ID tokens, or signing - // anything yet. - }, - nil, // hasher, shouldn't need this - we aren't doing any client auth...yet? - compose.OAuth2AuthorizeExplicitFactory, - compose.OpenIDConnectExplicitFactory, - compose.OAuth2PKCEFactory, + + // Shouldn't need any of this filled in as of right now - we aren't doing auth code stuff, + // issuing ID tokens, or signing anything yet. + &compose.CommonStrategy{}, + + // hasher, shouldn't need this right now - we aren't doing any client auth...yet? + nil, + + // We will _probably_ want the below handlers somewhere in the code, but I'm not sure where yet, + // and we don't need them for the tests to pass currently, so they are commented out. + // compose.OAuth2AuthorizeExplicitFactory, + // compose.OpenIDConnectExplicitFactory, + // compose.OAuth2PKCEFactory, ) return httperr.HandlerFunc(func(w http.ResponseWriter, r *http.Request) error { if r.Method != http.MethodPost && r.Method != http.MethodGet {