forked from Mirrors/oauth2
Fix format issues
This commit is contained in:
parent
a4ca1949a3
commit
efb2e8a08a
|
@ -23,7 +23,7 @@ import (
|
||||||
var (
|
var (
|
||||||
privateKey *rsa.PrivateKey
|
privateKey *rsa.PrivateKey
|
||||||
jsonKey []byte
|
jsonKey []byte
|
||||||
once sync.Once
|
once sync.Once
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestJWTAccessTokenSourceFromJSON(t *testing.T) {
|
func TestJWTAccessTokenSourceFromJSON(t *testing.T) {
|
||||||
|
@ -139,7 +139,7 @@ func TestJWTAccessTokenSourceWithScope(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func setupDummyKey(t *testing.T) {
|
func setupDummyKey(t *testing.T) {
|
||||||
once.Do(func () {
|
once.Do(func() {
|
||||||
// Generate a key we can use in the test data.
|
// Generate a key we can use in the test data.
|
||||||
pk, err := rsa.GenerateKey(rand.Reader, 2048)
|
pk, err := rsa.GenerateKey(rand.Reader, 2048)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -156,5 +156,5 @@ func setupDummyKey(t *testing.T) {
|
||||||
t.Fatalf("json.Marshal: %v", err)
|
t.Fatalf("json.Marshal: %v", err)
|
||||||
}
|
}
|
||||||
jsonKey = bytes.Replace(jwtJSONKey, []byte(`"super secret key"`), enc, 1)
|
jsonKey = bytes.Replace(jwtJSONKey, []byte(`"super secret key"`), enc, 1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue