refactoring
This commit is contained in:
parent
d7ed59db2b
commit
d368b2d950
7 changed files with 77 additions and 211 deletions
|
@ -72,18 +72,18 @@ func (v *Verifier) VerifyIDToken(ctx context.Context, idToken string) (*oidc.IDT
|
|||
return nil, nil
|
||||
}
|
||||
|
||||
type Sig struct{}
|
||||
type Sig struct {
|
||||
signer jose.Signer
|
||||
}
|
||||
|
||||
func (s *Sig) Signer() jose.Signer {
|
||||
return s.signer
|
||||
}
|
||||
|
||||
func (s *Sig) Health(ctx context.Context) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (s *Sig) SignIDToken(*oidc.IDTokenClaims) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
func (s *Sig) SignAccessToken(*oidc.accessTokenClaims) (string, error) {
|
||||
return "", nil
|
||||
}
|
||||
func (s *Sig) SignatureAlgorithm() jose.SignatureAlgorithm {
|
||||
return jose.HS256
|
||||
}
|
||||
|
@ -92,9 +92,3 @@ func ExpectStorage(a op.Authorizer, t *testing.T) {
|
|||
mockA := a.(*MockAuthorizer)
|
||||
mockA.EXPECT().Storage().AnyTimes().Return(NewMockStorageAny(t))
|
||||
}
|
||||
|
||||
// func NewMockSignerAny(t *testing.T) op.Signer {
|
||||
// m := NewMockSigner(gomock.NewController(t))
|
||||
// m.EXPECT().Sign(gomock.Any()).AnyTimes().Return("", nil)
|
||||
// return m
|
||||
// }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue