keys and more
This commit is contained in:
parent
92dee085b7
commit
3082234dae
9 changed files with 74 additions and 3 deletions
|
@ -14,6 +14,7 @@ const (
|
|||
defaulTokenEndpoint = "oauth/token"
|
||||
defaultIntrospectEndpoint = "introspect"
|
||||
defaultUserinfoEndpoint = "userinfo"
|
||||
defaultKeysEndpoint = "keys"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -22,6 +23,7 @@ var (
|
|||
Token: defaulTokenEndpoint,
|
||||
IntrospectionEndpoint: defaultIntrospectEndpoint,
|
||||
Userinfo: defaultUserinfoEndpoint,
|
||||
JwksURI: defaultKeysEndpoint,
|
||||
}
|
||||
DefaultIDTokenValidity = time.Duration(5 * time.Minute)
|
||||
)
|
||||
|
@ -146,6 +148,10 @@ func (p *DefaultOP) UserinfoEndpoint() Endpoint {
|
|||
return Endpoint(p.endpoints.Userinfo)
|
||||
}
|
||||
|
||||
func (p *DefaultOP) KeysEndpoint() Endpoint {
|
||||
return Endpoint(p.endpoints.JwksURI)
|
||||
}
|
||||
|
||||
func (p *DefaultOP) Port() string {
|
||||
return p.config.Port
|
||||
}
|
||||
|
@ -186,6 +192,10 @@ func (p *DefaultOP) IDTokenValidity() time.Duration {
|
|||
// return AuthRequestError
|
||||
// }
|
||||
|
||||
func (p *DefaultOP) HandleKeys(w http.ResponseWriter, r *http.Request) {
|
||||
Keys(w, r, p)
|
||||
}
|
||||
|
||||
func (p *DefaultOP) HandleAuthorize(w http.ResponseWriter, r *http.Request) {
|
||||
Authorize(w, r, p)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue