handle request object
This commit is contained in:
parent
72a9829117
commit
f067d723f2
7 changed files with 196 additions and 36 deletions
|
@ -6,6 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"golang.org/x/text/language"
|
||||
"gopkg.in/square/go-jose.v2"
|
||||
)
|
||||
|
||||
type Audience []string
|
||||
|
@ -106,3 +107,16 @@ func (t *Time) UnmarshalJSON(data []byte) error {
|
|||
func (t *Time) MarshalJSON() ([]byte, error) {
|
||||
return json.Marshal(time.Time(*t).UTC().Unix())
|
||||
}
|
||||
|
||||
type RequestObject struct {
|
||||
Issuer string `json:"iss"`
|
||||
Audience Audience `json:"aud"`
|
||||
AuthRequest
|
||||
}
|
||||
|
||||
func (r *RequestObject) GetIssuer() string {
|
||||
return r.Issuer
|
||||
}
|
||||
|
||||
func (r *RequestObject) SetSignatureAlgorithm(algorithm jose.SignatureAlgorithm) {
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue