mirror of
https://github.com/hanzo-cpp/sdk.git
synced 2026-11-20 19:55:32 +00:00
The projection these were generated from was a month old and predated the compute migration, so every one of them described /v1/visor — which the API serves at zero paths now. That is why a hand-written console client and a generated one had drifted the same way at the same time. No /v1/visor path survives here. The word still appears as a source-plane value and inside gvisor and supervisor, which are not this rename.
319 lines
9.5 KiB
C++
319 lines
9.5 KiB
C++
/**
|
|
* Hanzo Cloud API
|
|
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
|
|
*
|
|
* The version of the OpenAPI document: v1
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI-Generator 7.14.0.
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
/*
|
|
* Iam_Token.h
|
|
*
|
|
*
|
|
*/
|
|
|
|
#ifndef HANZO_MODEL_Iam_Token_H_
|
|
#define HANZO_MODEL_Iam_Token_H_
|
|
|
|
#include <boost/optional.hpp>
|
|
|
|
#include "hanzo/ModelBase.h"
|
|
|
|
#include <cpprest/details/basic_types.h>
|
|
|
|
namespace hanzo {
|
|
namespace model {
|
|
|
|
|
|
|
|
class Iam_Token
|
|
: public ModelBase
|
|
{
|
|
public:
|
|
Iam_Token();
|
|
virtual ~Iam_Token();
|
|
|
|
/////////////////////////////////////////////
|
|
/// ModelBase overrides
|
|
|
|
void validate() override;
|
|
|
|
web::json::value toJson() const override;
|
|
bool fromJson(const web::json::value& json) override;
|
|
|
|
void toMultipart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) const override;
|
|
bool fromMultiPart(std::shared_ptr<MultipartFormData> multipart, const utility::string_t& namePrefix) override;
|
|
|
|
|
|
/////////////////////////////////////////////
|
|
/// Iam_Token members
|
|
|
|
|
|
utility::string_t getAccessToken() const;
|
|
bool accessTokenIsSet() const;
|
|
void unsetAccessToken();
|
|
void setAccessToken(const utility::string_t& value);
|
|
|
|
utility::string_t getAccessTokenHash() const;
|
|
bool accessTokenHashIsSet() const;
|
|
void unsetAccessTokenHash();
|
|
void setAccessTokenHash(const utility::string_t& value);
|
|
|
|
utility::string_t getApplication() const;
|
|
bool applicationIsSet() const;
|
|
void unsetApplication();
|
|
void setApplication(const utility::string_t& value);
|
|
|
|
utility::string_t getCode() const;
|
|
bool codeIsSet() const;
|
|
void unsetCode();
|
|
void setCode(const utility::string_t& value);
|
|
|
|
utility::string_t getCodeChallenge() const;
|
|
bool codeChallengeIsSet() const;
|
|
void unsetCodeChallenge();
|
|
void setCodeChallenge(const utility::string_t& value);
|
|
|
|
utility::string_t getCodeChallengeMethod() const;
|
|
bool codeChallengeMethodIsSet() const;
|
|
void unsetCodeChallengeMethod();
|
|
void setCodeChallengeMethod(const utility::string_t& value);
|
|
|
|
int64_t getCodeExpireIn() const;
|
|
bool codeExpireInIsSet() const;
|
|
void unsetCodeExpireIn();
|
|
void setCodeExpireIn(int64_t value);
|
|
|
|
bool isCodeIsUsed() const;
|
|
bool codeIsUsedIsSet() const;
|
|
void unsetCodeIsUsed();
|
|
void setCodeIsUsed(bool value);
|
|
|
|
utility::datetime getCreatedAt() const;
|
|
bool createdAtIsSet() const;
|
|
void unsetCreatedAt();
|
|
void setCreatedAt(const utility::datetime& value);
|
|
|
|
utility::string_t getCreatedTime() const;
|
|
bool createdTimeIsSet() const;
|
|
void unsetCreatedTime();
|
|
void setCreatedTime(const utility::string_t& value);
|
|
|
|
bool isDeleted() const;
|
|
bool deletedIsSet() const;
|
|
void unsetDeleted();
|
|
void setDeleted(bool value);
|
|
|
|
int64_t getExpiresIn() const;
|
|
bool expiresInIsSet() const;
|
|
void unsetExpiresIn();
|
|
void setExpiresIn(int64_t value);
|
|
|
|
utility::string_t getId() const;
|
|
bool idIsSet() const;
|
|
void unsetId();
|
|
void setId(const utility::string_t& value);
|
|
|
|
utility::string_t getName() const;
|
|
bool nameIsSet() const;
|
|
void unsetName();
|
|
void setName(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// Nonce is the OIDC authorize nonce, stored on the code and echoed into the id_token minted at the exchange (OIDC Core §3.1.3.6) so a relying party binds the id_token to its own request and detects replay.
|
|
/// </summary>
|
|
utility::string_t getNonce() const;
|
|
bool nonceIsSet() const;
|
|
void unsetNonce();
|
|
void setNonce(const utility::string_t& value);
|
|
|
|
utility::string_t getOrganization() const;
|
|
bool organizationIsSet() const;
|
|
void unsetOrganization();
|
|
void setOrganization(const utility::string_t& value);
|
|
|
|
utility::string_t getOwner() const;
|
|
bool ownerIsSet() const;
|
|
void unsetOwner();
|
|
void setOwner(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// PublicGrant records that this grant was established WITHOUT client authentication — a PKCE code exchange from a client that presented no secret. Whether a client is confidential is a property of the GRANT, not only of the registration: `hanzo-cli` and every @hanzo/iam SPA keep a registered secret for a BACKEND path while the surface that actually signs in is a public PKCE client that cannot hold one. authorizationCodeGrant already makes exactly that bounded relaxation; this is the same fact, recorded so refreshTokenGrant can honour it instead of demanding a secret the client never had (which 401s invalid_client and kills the session at the access token's expiry). Carried across rotation, so the second refresh behaves like the first.
|
|
/// </summary>
|
|
bool isPublicGrant() const;
|
|
bool publicGrantIsSet() const;
|
|
void unsetPublicGrant();
|
|
void setPublicGrant(bool value);
|
|
|
|
/// <summary>
|
|
/// RedirectUri binds the authorization code to the exact redirect URI of the authorize request (RFC 6749 §4.1.3): the token endpoint refuses a code redeemed with a different redirect_uri, closing code-injection across a client's registered URIs.
|
|
/// </summary>
|
|
utility::string_t getRedirectUri() const;
|
|
bool redirectUriIsSet() const;
|
|
void unsetRedirectUri();
|
|
void setRedirectUri(const utility::string_t& value);
|
|
|
|
bool isRefreshConsumed() const;
|
|
bool refreshConsumedIsSet() const;
|
|
void unsetRefreshConsumed();
|
|
void setRefreshConsumed(bool value);
|
|
|
|
int64_t getRefreshExpireIn() const;
|
|
bool refreshExpireInIsSet() const;
|
|
void unsetRefreshExpireIn();
|
|
void setRefreshExpireIn(int64_t value);
|
|
|
|
/// <summary>
|
|
/// Refresh-token rotation state (v2). Each refresh belongs to a family (the grant); rotation mints a new row in the same family and marks the prior one consumed. Presenting a consumed refresh is reuse — the whole family is revoked (RFC 9700 §4.14.2). RefreshExpireIn is the refresh token's own absolute expiry (unix), independent of the access token's shorter life.
|
|
/// </summary>
|
|
utility::string_t getRefreshFamily() const;
|
|
bool refreshFamilyIsSet() const;
|
|
void unsetRefreshFamily();
|
|
void setRefreshFamily(const utility::string_t& value);
|
|
|
|
utility::string_t getRefreshToken() const;
|
|
bool refreshTokenIsSet() const;
|
|
void unsetRefreshToken();
|
|
void setRefreshToken(const utility::string_t& value);
|
|
|
|
utility::string_t getRefreshTokenHash() const;
|
|
bool refreshTokenHashIsSet() const;
|
|
void unsetRefreshTokenHash();
|
|
void setRefreshTokenHash(const utility::string_t& value);
|
|
|
|
/// <summary>
|
|
/// RFC 8707 resource indicator
|
|
/// </summary>
|
|
utility::string_t getResource() const;
|
|
bool resourceIsSet() const;
|
|
void unsetResource();
|
|
void setResource(const utility::string_t& value);
|
|
|
|
utility::string_t getScope() const;
|
|
bool scopeIsSet() const;
|
|
void unsetScope();
|
|
void setScope(const utility::string_t& value);
|
|
|
|
utility::string_t getTokenType() const;
|
|
bool tokenTypeIsSet() const;
|
|
void unsetTokenType();
|
|
void setTokenType(const utility::string_t& value);
|
|
|
|
utility::datetime getUpdatedAt() const;
|
|
bool updatedAtIsSet() const;
|
|
void unsetUpdatedAt();
|
|
void setUpdatedAt(const utility::datetime& value);
|
|
|
|
utility::string_t getUser() const;
|
|
bool userIsSet() const;
|
|
void unsetUser();
|
|
void setUser(const utility::string_t& value);
|
|
|
|
utility::string_t getUserCode() const;
|
|
bool userCodeIsSet() const;
|
|
void unsetUserCode();
|
|
void setUserCode(const utility::string_t& value);
|
|
|
|
|
|
protected:
|
|
utility::string_t m_AccessToken;
|
|
bool m_AccessTokenIsSet;
|
|
|
|
utility::string_t m_AccessTokenHash;
|
|
bool m_AccessTokenHashIsSet;
|
|
|
|
utility::string_t m_Application;
|
|
bool m_ApplicationIsSet;
|
|
|
|
utility::string_t m_Code;
|
|
bool m_CodeIsSet;
|
|
|
|
utility::string_t m_CodeChallenge;
|
|
bool m_CodeChallengeIsSet;
|
|
|
|
utility::string_t m_CodeChallengeMethod;
|
|
bool m_CodeChallengeMethodIsSet;
|
|
|
|
int64_t m_CodeExpireIn;
|
|
bool m_CodeExpireInIsSet;
|
|
|
|
bool m_CodeIsUsed;
|
|
bool m_CodeIsUsedIsSet;
|
|
|
|
utility::datetime m_CreatedAt;
|
|
bool m_CreatedAtIsSet;
|
|
|
|
utility::string_t m_CreatedTime;
|
|
bool m_CreatedTimeIsSet;
|
|
|
|
bool m_Deleted;
|
|
bool m_DeletedIsSet;
|
|
|
|
int64_t m_ExpiresIn;
|
|
bool m_ExpiresInIsSet;
|
|
|
|
utility::string_t m_Id;
|
|
bool m_IdIsSet;
|
|
|
|
utility::string_t m_Name;
|
|
bool m_NameIsSet;
|
|
|
|
utility::string_t m_Nonce;
|
|
bool m_NonceIsSet;
|
|
|
|
utility::string_t m_Organization;
|
|
bool m_OrganizationIsSet;
|
|
|
|
utility::string_t m_Owner;
|
|
bool m_OwnerIsSet;
|
|
|
|
bool m_PublicGrant;
|
|
bool m_PublicGrantIsSet;
|
|
|
|
utility::string_t m_RedirectUri;
|
|
bool m_RedirectUriIsSet;
|
|
|
|
bool m_RefreshConsumed;
|
|
bool m_RefreshConsumedIsSet;
|
|
|
|
int64_t m_RefreshExpireIn;
|
|
bool m_RefreshExpireInIsSet;
|
|
|
|
utility::string_t m_RefreshFamily;
|
|
bool m_RefreshFamilyIsSet;
|
|
|
|
utility::string_t m_RefreshToken;
|
|
bool m_RefreshTokenIsSet;
|
|
|
|
utility::string_t m_RefreshTokenHash;
|
|
bool m_RefreshTokenHashIsSet;
|
|
|
|
utility::string_t m_Resource;
|
|
bool m_ResourceIsSet;
|
|
|
|
utility::string_t m_Scope;
|
|
bool m_ScopeIsSet;
|
|
|
|
utility::string_t m_TokenType;
|
|
bool m_TokenTypeIsSet;
|
|
|
|
utility::datetime m_UpdatedAt;
|
|
bool m_UpdatedAtIsSet;
|
|
|
|
utility::string_t m_User;
|
|
bool m_UserIsSet;
|
|
|
|
utility::string_t m_UserCode;
|
|
bool m_UserCodeIsSet;
|
|
|
|
};
|
|
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* HANZO_MODEL_Iam_Token_H_ */
|