10Duke Enterprise C++ Client
|
#include <JWKSDownloader.h>
Service to download and parse JSON Web Key Set (JWKS).
Public Member Functions | |
JWKSDownloader (const std::shared_ptr< const tenduke::http::HTTPClient > &http, const std::shared_ptr< const tenduke::jwk::JWKSParser > &parseJwks, const std::shared_ptr< const tenduke::http::HTTPResponseToException > &throwException) | |
Constructs new instance. | |
virtual std::unique_ptr< tenduke::jwk::JWKS > | from (const std::string &url) const |
Downloads and parses the JWKS-document. | |
Protected Member Functions | |
virtual std::string | download (const std::string &url) const |
Downloads content of given URL and returns the payload as string. | |
tenduke::jwk::JWKSDownloader::JWKSDownloader | ( | const std::shared_ptr< const tenduke::http::HTTPClient > & | http, |
const std::shared_ptr< const tenduke::jwk::JWKSParser > & | parseJwks, | ||
const std::shared_ptr< const tenduke::http::HTTPResponseToException > & | throwException | ||
) |
Constructs new instance.
http | the HTTP-client |
parseJwks | JWKS-parser |
throwException | for mapping HTTP-status codes to exceptions |
|
protectedvirtual |
Downloads content of given URL and returns the payload as string.
url | - |
|
virtual |
Downloads and parses the JWKS-document.
url | - |
`tenduke::jwk::JWKException` | if download fails |
Reimplemented in tenduke::test::unittests::FakeJWKSDownloader.