10Duke Scale C++ Client
Loading...
Searching...
No Matches
tenduke::jwk::JWKSDownloader Class Reference

#include <JWKSDownloader.h>

Detailed Description

Service to download and parse JSON Web Key Set (JWKS).

Inheritance diagram for tenduke::jwk::JWKSDownloader:
tenduke::test::unittests::FakeJWKSDownloader

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::JWKSfrom (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.
 

Constructor & Destructor Documentation

◆ JWKSDownloader()

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.

Parameters
httpthe HTTP-client
parseJwksJWKS-parser
throwExceptionfor mapping HTTP-status codes to exceptions

Member Function Documentation

◆ download()

std::string tenduke::jwk::JWKSDownloader::download ( const std::string &  url) const
protectedvirtual

Downloads content of given URL and returns the payload as string.

Parameters
url-
Returns
-

◆ from()

std::unique_ptr< xdjwk::JWKS > tenduke::jwk::JWKSDownloader::from ( const std::string &  url) const
virtual

Downloads and parses the JWKS-document.

Parameters
url-
Returns
-
Exceptions
`tenduke::jwk::JWKException`if download fails

Reimplemented in tenduke::test::unittests::FakeJWKSDownloader.


The documentation for this class was generated from the following files: