feat: merge the verifier types (#336)
BREAKING CHANGE: - The various verifier types are merged into a oidc.Verifir. - oidc.Verfier became a struct with exported fields * use type aliases for oidc.Verifier this binds the correct contstructor to each verifier usecase. * fix: handle the zero cases for oidc.Time * add unit tests to oidc verifier * fix: correct returned field for JWTTokenRequest JWTTokenRequest.GetIssuedAt() was returning the ExpiresAt field. This change corrects that by returning IssuedAt instead.
This commit is contained in:
parent
c8cf15e266
commit
33c716ddcf
29 changed files with 948 additions and 351 deletions
|
@ -173,10 +173,16 @@ func NewEncoder() *schema.Encoder {
|
|||
type Time int64
|
||||
|
||||
func (ts Time) AsTime() time.Time {
|
||||
if ts == 0 {
|
||||
return time.Time{}
|
||||
}
|
||||
return time.Unix(int64(ts), 0)
|
||||
}
|
||||
|
||||
func FromTime(tt time.Time) Time {
|
||||
if tt.IsZero() {
|
||||
return 0
|
||||
}
|
||||
return Time(tt.Unix())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue