mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-15 15:16:12 -04:00
122 lines
6.0 KiB
C++
122 lines
6.0 KiB
C++
// WARNING: Please don't edit this file. It was generated by C++/WinRT
|
|
// v2.0.250303.1
|
|
|
|
#pragma once
|
|
#ifndef WINRT_Microsoft_Security_Authentication_OAuth_2_H
|
|
#define WINRT_Microsoft_Security_Authentication_OAuth_2_H
|
|
#include "winrt/impl/Microsoft.Security.Authentication.OAuth.1.h"
|
|
#include "winrt/impl/Microsoft.UI.1.h"
|
|
#include "winrt/impl/Windows.Foundation.1.h"
|
|
#include "winrt/impl/Windows.Web.Http.Headers.1.h"
|
|
WINRT_EXPORT namespace winrt::Microsoft::Security::Authentication::OAuth {
|
|
struct WINRT_IMPL_EMPTY_BASES AuthFailure
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure {
|
|
AuthFailure(std::nullptr_t) noexcept {}
|
|
AuthFailure(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure(
|
|
ptr, take_ownership_from_abi) {}
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES AuthRequestParams
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams {
|
|
AuthRequestParams(std::nullptr_t) noexcept {}
|
|
AuthRequestParams(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams(
|
|
ptr, take_ownership_from_abi) {}
|
|
AuthRequestParams(param::hstring const& responseType,
|
|
param::hstring const& clientId);
|
|
AuthRequestParams(param::hstring const& responseType,
|
|
param::hstring const& clientId,
|
|
winrt::Windows::Foundation::Uri const& redirectUri);
|
|
static auto CreateForAuthorizationCodeRequest(
|
|
param::hstring const& clientId);
|
|
static auto CreateForAuthorizationCodeRequest(
|
|
param::hstring const& clientId,
|
|
winrt::Windows::Foundation::Uri const& redirectUri);
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES AuthRequestResult
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult {
|
|
AuthRequestResult(std::nullptr_t) noexcept {}
|
|
AuthRequestResult(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult(
|
|
ptr, take_ownership_from_abi) {}
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES AuthResponse
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse {
|
|
AuthResponse(std::nullptr_t) noexcept {}
|
|
AuthResponse(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse(
|
|
ptr, take_ownership_from_abi) {}
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES ClientAuthentication
|
|
: winrt::Microsoft::Security::Authentication::OAuth::
|
|
IClientAuthentication {
|
|
ClientAuthentication(std::nullptr_t) noexcept {}
|
|
ClientAuthentication(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::
|
|
IClientAuthentication(ptr, take_ownership_from_abi) {}
|
|
ClientAuthentication();
|
|
explicit ClientAuthentication(
|
|
winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const&
|
|
authorization);
|
|
static auto CreateForBasicAuthorization(param::hstring const& clientId,
|
|
param::hstring const& clientSecret);
|
|
};
|
|
struct OAuth2Manager {
|
|
OAuth2Manager() = delete;
|
|
static auto RequestAuthWithParamsAsync(
|
|
winrt::Microsoft::UI::WindowId const& parentWindowId,
|
|
winrt::Windows::Foundation::Uri const& authEndpoint,
|
|
winrt::Microsoft::Security::Authentication::OAuth::
|
|
AuthRequestParams const& params);
|
|
static auto CompleteAuthRequest(
|
|
winrt::Windows::Foundation::Uri const& responseUri);
|
|
static auto RequestTokenAsync(
|
|
winrt::Windows::Foundation::Uri const& tokenEndpoint,
|
|
winrt::Microsoft::Security::Authentication::OAuth::
|
|
TokenRequestParams const& params);
|
|
static auto RequestTokenAsync(
|
|
winrt::Windows::Foundation::Uri const& tokenEndpoint,
|
|
winrt::Microsoft::Security::Authentication::OAuth::
|
|
TokenRequestParams const& params,
|
|
winrt::Microsoft::Security::Authentication::OAuth::
|
|
ClientAuthentication const& clientAuth);
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES TokenFailure
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure {
|
|
TokenFailure(std::nullptr_t) noexcept {}
|
|
TokenFailure(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure(
|
|
ptr, take_ownership_from_abi) {}
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES TokenRequestParams
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams {
|
|
TokenRequestParams(std::nullptr_t) noexcept {}
|
|
TokenRequestParams(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::
|
|
ITokenRequestParams(ptr, take_ownership_from_abi) {}
|
|
explicit TokenRequestParams(param::hstring const& grantType);
|
|
static auto CreateForAuthorizationCodeRequest(
|
|
winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const&
|
|
authResponse);
|
|
static auto CreateForClientCredentials();
|
|
static auto CreateForExtension(
|
|
winrt::Windows::Foundation::Uri const& extensionUri);
|
|
static auto CreateForRefreshToken(param::hstring const& refreshToken);
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES TokenRequestResult
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult {
|
|
TokenRequestResult(std::nullptr_t) noexcept {}
|
|
TokenRequestResult(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::
|
|
ITokenRequestResult(ptr, take_ownership_from_abi) {}
|
|
};
|
|
struct WINRT_IMPL_EMPTY_BASES TokenResponse
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse {
|
|
TokenResponse(std::nullptr_t) noexcept {}
|
|
TokenResponse(void* ptr, take_ownership_from_abi_t) noexcept
|
|
: winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse(
|
|
ptr, take_ownership_from_abi) {}
|
|
};
|
|
}
|
|
#endif
|