Skip to content

Commit c5b094a

Browse files
committed
Lint
1 parent 812e409 commit c5b094a

3 files changed

Lines changed: 14 additions & 14 deletions

File tree

generate/scope_generator.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,15 +128,15 @@ func GenTokenScope() {
128128
defer f.Close()
129129

130130
err = tokenTemplate.Execute(f, struct {
131-
Scopes []ScopeName
132-
WlcgScopes []ScopeName
131+
Scopes []ScopeName
132+
WlcgScopes []ScopeName
133133
ScitokensScopes []ScopeName
134-
LotmanScopes []ScopeName
134+
LotmanScopes []ScopeName
135135
}{
136-
Scopes: scopes,
137-
WlcgScopes: wlcgScopes,
136+
Scopes: scopes,
137+
WlcgScopes: wlcgScopes,
138138
ScitokensScopes: scitokensScopes,
139-
LotmanScopes: lotmanScopes,
139+
LotmanScopes: lotmanScopes,
140140
})
141141

142142
if err != nil {

token/token_create.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,18 @@ type (
4848
StorageTokenProfile interface {
4949
TokenProfile
5050

51-
ReadScope(string) token_scopes.TokenScope
52-
WriteScope(string) token_scopes.TokenScope
51+
ReadScope(string) token_scopes.TokenScope
52+
WriteScope(string) token_scopes.TokenScope
5353
ModifyScope(string) token_scopes.TokenScope
54-
StageScope(string) token_scopes.TokenScope
54+
StageScope(string) token_scopes.TokenScope
5555

5656
AnyAudience() string
5757
}
58-
NoneTokenProfile struct{}
59-
WlcgProfile struct{}
58+
NoneTokenProfile struct{}
59+
WlcgProfile struct{}
6060
Scitokens2Profile struct{}
6161

62-
TokenConfig struct {
62+
TokenConfig struct {
6363
tokenProfile TokenProfile
6464
Lifetime time.Duration // Lifetime is used to set 'exp' claim from now
6565
Issuer string // Issuer is 'iss' claim

token/token_create_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ func TestCreateToken(t *testing.T) {
242242
assert.EqualError(t, err, "invalid tokenConfig: the 'audience' claim is required for the scitokens2 profile, but it could not be found")
243243

244244
// Test that additional claims can be passed into the token
245-
tokenConfig = TokenConfig{tokenProfile: WlcgProfile{}, audience: []string{"foo"}, Subject: "bar", Lifetime: time.Minute * 10, Claims: map[string]string{"foo": "bar"}}
245+
tokenConfig = TokenConfig{tokenProfile: WlcgProfile{}, audience: []string{"foo"}, Subject: "bar", Lifetime: time.Minute * 10, Claims: map[string]string{"foo": "bar"}}
246246
token, err := tokenConfig.CreateToken()
247247
require.NoError(t, err)
248248
jwt, err := jwt.ParseString(token, jwt.WithVerify(false))
@@ -253,7 +253,7 @@ func TestCreateToken(t *testing.T) {
253253

254254
// Test providing issuer via claim
255255
viper.Set("IssuerUrl", "")
256-
tokenConfig = TokenConfig{tokenProfile: WlcgProfile{}, audience: []string{"foo"}, Subject: "bar", Issuer: "https://localhost:9999", Lifetime: time.Minute * 10}
256+
tokenConfig = TokenConfig{tokenProfile: WlcgProfile{}, audience: []string{"foo"}, Subject: "bar", Issuer: "https://localhost:9999", Lifetime: time.Minute * 10}
257257
_, err = tokenConfig.CreateToken()
258258
assert.NoError(t, err)
259259

0 commit comments

Comments
 (0)