You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then, each of the above variations has a private struct type and a constructor function. (For the sake of simplicity I will not link those here.)
Proposal
The Verifiers are mere data carriers with reference parameters we use to check against. The actual verification is done in a related VerifyXXXToken function which passes relevant parameters to CheckXXX functions in oidc. Therefore I would make sense to merge all of the above types in a single struct type on oidc and delete all the getter methods.
The constructor function for specific tokens will be kept to guide users into setting the correct fields.
Acceptance criteria
oidc.Verifier will be a struct type
The fields currently in all the op and rp types are merged into oidc.Verifier
The oidc.Verifier fields will be exported
The op and rp types will be removed
The text was updated successfully, but these errors were encountered:
As a maintainer I want to increase test coverage, however I'm lazy and don't want to do this for redundant code.
Situation of Verifier types
Currently we have a base interface
oidc.Verifier
:oidc/pkg/oidc/verifier.go
Lines 58 to 62 in 4dca29f
Which is further extended in specific interface type:
op.AccessTokenVerifier
op.IDTokenHintVerifier
op.JWTProfileVerifier
rp.IDTokenVerifier
Then, each of the above variations has a private struct type and a constructor function. (For the sake of simplicity I will not link those here.)
Proposal
The Verifiers are mere data carriers with reference parameters we use to check against. The actual verification is done in a related
VerifyXXXToken
function which passes relevant parameters toCheckXXX
functions inoidc
. Therefore I would make sense to merge all of the above types in a single struct type onoidc
and delete all the getter methods.The constructor function for specific tokens will be kept to guide users into setting the correct fields.
Acceptance criteria
op
andrp
types are merged intooidc.Verifier
oidc.Verifier
fields will be exportedop
andrp
types will be removedThe text was updated successfully, but these errors were encountered: