Provide generic interfaces for token based authorization#156
Conversation
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #156 +/- ##
==========================================
- Coverage 63.84% 63.12% -0.72%
==========================================
Files 71 68 -3
Lines 4306 4160 -146
Branches 530 521 -9
==========================================
- Hits 2749 2626 -123
+ Misses 1329 1308 -21
+ Partials 228 226 -2
|
| class GrpcTokenClient : public TokenClient { | ||
| public: | ||
| explicit GrpcTokenClient(std::string const& auth_header_key) : m_auth_header_key(auth_header_key) {} | ||
| virtual ~GrpcTokenClient() = default; |
| public: | ||
| virtual ~TokenClient() = default; | ||
|
|
||
| virtual std::string get_token() = 0; |
There was a problem hiding this comment.
const
Is this only ever implemented/used by the Mock? I don't see it defined anywhere. Not clear what this interface is for since even GrpcTokenClient doesn't fully implement it.
There was a problem hiding this comment.
This is only ever implemented by Mock for unit tests. The real implementation will be in the new library I created, which is ebay specific.
https://github.corp.ebay.com/SDS/auth_manager/tree/inherit_from_sisl/src/include/auth_manager
The idea is if the user wants a token based auth system, they implement these interfaces and pass it along to grpc client and server. Any implementation would be ebay specific and cannot live here in sisl
szmyd
left a comment
There was a problem hiding this comment.
Not clear to me why there are two interfaces here?
Replace the specific implementation of token based authorization with generic interfaces.