Hello,
I'm implementing an OAuth2 resource service (RS).
It's basically a Rest Service which uses an HTTP header for authorization :
Authorization: Bearer mF_9.B5f-4.1JqM
See
http://self-issued.info/docs/draft-ietf-oauth-v2-bearer.html#authz-headerIn a first time, this will be an opaque token, so my RS needs to call an OAuth introspection endpoint to retrieve information (most notably caller id and granted OAuth scopes).
https://tools.ietf.org/html/rfc7662I didn't found OOB support for this scenario in Silhouette (correct me if I'm wrong please !).
I'm trying to implement this flow with Silhouette, but I'm wondering if I'm on the right path.
I'm thinking of extending from RequestProvider.
I'll inject an IdentityService into RequestProvider.
When my RequestProvider.authenticate method is called :
1. I'll get the token from Authorization HTTP Header.
2. I'll call the introspect Url
3. I'll build a User from introspect Url response.
4. I'll build a LoginInfo with my RequestProvider id and the token.
4. And I'll call identityService.save(loginInfo, user)
Is it the good way to implement this flow with Silhouette ?
Or is there a better way ?
Thanks,
Adrian