implement RFC7662: token introspection
Close #654
Added IETF RFC 7662 Token Introspection
OAuth2::Client#introspect_tokenOAuth2::AccessToken#introspect
Testing
require "oauth2"
client = OAuth2::Client.new(
"xxx",
"xxx",
site: "https://xxx.xxx/",
# token_url: "xxx",
# introspect_url: "xxx"
)
token = client.get_token({
grant_type: "refresh_token",
refresh_token: "xxx"
})
token.introspect
token.introspect(token_type_hint: "refresh_token")
Edited by Lian Wang