@@ 6,8 6,8 @@ import (
"testing"
"time"
- "sourcecraft.dev/bigbes/sr-ht-core/auth"
"github.com/dolthub/dolt/go/libraries/doltcore/creds"
+ "sourcecraft.dev/bigbes/sr-ht-core/auth"
)
func basicHeader(user, pass string) string {
@@ 7,8 7,8 @@ import (
"testing"
"time"
- "sourcecraft.dev/bigbes/sr-ht-core/auth"
"github.com/dolthub/dolt/go/libraries/doltcore/creds"
+ "sourcecraft.dev/bigbes/sr-ht-core/auth"
)
const testAud = "dolt.srht.bigb.es"
@@ 47,7 47,7 @@ func TestResolveBasic_UsernameTildeAndCaseInsensitive(t *testing.T) {
func TestResolveBasic_UsernameMismatch(t *testing.T) {
withStubBackend(t, &stubBackend{users: map[string]auth.AuthContext{
- "bigbes": sampleUser(1, "bigbes", auth.USER_TYPE_USER),
+ "bigbes": sampleUser(1, "bigbes", auth.USER_TYPE_USER),
"mallory": sampleUser(2, "mallory", auth.USER_TYPE_USER),
}})
pat := forgePAT("bigbes", "", time.Now().Add(time.Hour))
@@ 210,10 210,10 @@ func TestTokenGrantsAllow(t *testing.T) {
}
cases := []struct {
- name string
- ac *auth.AuthContext
- mode core.AccessMode
- want bool
+ name string
+ ac *auth.AuthContext
+ mode core.AccessMode
+ want bool
}{
{"nil caller passes", nil, core.AccessRW, true},
{"cookie (no bearer) passes", &auth.AuthContext{AuthMethod: auth.AUTH_COOKIE}, core.AccessRW, true},