Sourcemeta Core 0.0.0
Loading...
Searching...
No Matches
jose_sign.h
1#ifndef SOURCEMETA_CORE_JOSE_SIGN_H_
2#define SOURCEMETA_CORE_JOSE_SIGN_H_
3
4#ifndef SOURCEMETA_CORE_JOSE_EXPORT
5#include <sourcemeta/core/jose_export.h>
6#endif
7
8#include <sourcemeta/core/jose_algorithm.h>
9#include <sourcemeta/core/jose_jwk_private.h>
10
11#include <sourcemeta/core/json.h>
12
13#include <optional> // std::optional
14#include <string> // std::string
15#include <string_view> // std::string_view
16
17namespace sourcemeta::core {
18
37SOURCEMETA_CORE_JOSE_EXPORT
38auto jws_sign(const JWSAlgorithm algorithm,
39 const std::string_view signing_input, const JWKPrivate &key)
40 -> std::optional<std::string>;
41
63SOURCEMETA_CORE_JOSE_EXPORT
64auto jwt_sign(const JSON &header, const JSON &payload, const JWKPrivate &key)
65 -> std::optional<std::string>;
66
67} // namespace sourcemeta::core
68
69#endif
Definition jose_jwk_private.h:35
SOURCEMETA_CORE_JOSE_EXPORT auto jwt_sign(const JSON &header, const JSON &payload, const JWKPrivate &key) -> std::optional< std::string >
JWSAlgorithm
Definition jose_algorithm.h:21
SOURCEMETA_CORE_JOSE_EXPORT auto jws_sign(const JWSAlgorithm algorithm, const std::string_view signing_input, const JWKPrivate &key) -> std::optional< std::string >
Definition json_value.h:39