Skip to content

Commit

Permalink
Move dynoid middleware out of hmiddleware to dynoid package.
Browse files Browse the repository at this point in the history
  • Loading branch information
kennyp committed Mar 14, 2024
1 parent c4ed38f commit 4642012
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dynoid/dynoid.go
Expand Up @@ -16,10 +16,10 @@ import (
)

const (
DefaultAudience = "heroku"
defaultAudience = "heroku"

//nolint: gosec
DefaultTokenPath = "/etc/heroku/dyno_id_token"
defaultTokenPath = "/etc/heroku/dyno_id_token"
)

// Returned by an IssuerCallback getting an issuer it doesn't trust
Expand Down Expand Up @@ -146,8 +146,8 @@ func (t *Token) LogValue() slog.Value {

// LocalTokenPath returns the path on disk to the token for the given audience
func LocalTokenPath(audience string) string {
if audience == DefaultAudience {
return DefaultTokenPath
if audience == defaultAudience {
return defaultTokenPath
}

return fmt.Sprintf("/etc/heroku/dyno-id/%s/token", audience)
Expand Down
@@ -1,4 +1,4 @@
package dynoid
package middleware

import (
"context"
Expand Down
@@ -1,4 +1,4 @@
package dynoid_test
package middleware_test

import (
"context"
Expand All @@ -12,7 +12,7 @@ import (

"github.com/heroku/x/dynoid"
"github.com/heroku/x/dynoid/dynoidtest"
middleware "github.com/heroku/x/hmiddleware/dynoid"
"github.com/heroku/x/dynoid/middleware"
)

func TestAuthorize(t *testing.T) {
Expand Down

0 comments on commit 4642012

Please sign in to comment.