// WARNING: Please don't edit this file. It was generated by C++/WinRT v2.0.240405.15 #pragma once #ifndef WINRT_Microsoft_Security_Authentication_OAuth_H #define WINRT_Microsoft_Security_Authentication_OAuth_H #include "winrt/base.h" static_assert(winrt::check_version(CPPWINRT_VERSION, "2.0.240405.15"), "Mismatched C++/WinRT headers."); #define CPPWINRT_VERSION "2.0.240405.15" #include "winrt/impl/Microsoft.UI.2.h" #include "winrt/impl/Windows.Data.Json.2.h" #include "winrt/impl/Windows.Foundation.2.h" #include "winrt/impl/Windows.Foundation.Collections.2.h" #include "winrt/impl/Windows.Web.Http.2.h" #include "winrt/impl/Windows.Web.Http.Headers.2.h" #include "winrt/impl/Microsoft.Security.Authentication.OAuth.2.h" namespace winrt::impl { template auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure::Error() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_Error(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure::ErrorDescription() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_ErrorDescription(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure::ErrorUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_ErrorUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure::State() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_State(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthFailure::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthFailure)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::ResponseType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_ResponseType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::ResponseType(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_ResponseType(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::ClientId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_ClientId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::ClientId(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_ClientId(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::RedirectUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_RedirectUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::RedirectUri(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_RedirectUri(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::State() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_State(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::State(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_State(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::Scope() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_Scope(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::Scope(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_Scope(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::CodeChallenge() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_CodeChallenge(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::CodeChallenge(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_CodeChallenge(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::CodeChallengeMethod() const { winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_CodeChallengeMethod(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::CodeChallengeMethod(winrt::Microsoft::Security::Authentication::OAuth::CodeChallengeMethodKind const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->put_CodeChallengeMethod(static_cast(value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParams::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParams)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsFactory::CreateInstance(param::hstring const& responseType, param::hstring const& clientId) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory)->CreateInstance(*(void**)(&responseType), *(void**)(&clientId), &value)); return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsFactory::CreateInstance2(param::hstring const& responseType, param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsFactory)->CreateInstance2(*(void**)(&responseType), *(void**)(&clientId), *(void**)(&redirectUri), &value)); return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsStatics::CreateForAuthorizationCodeRequest(param::hstring const& clientId) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics)->CreateForAuthorizationCodeRequest(*(void**)(&clientId), &result)); return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestParamsStatics::CreateForAuthorizationCodeRequest(param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestParamsStatics)->CreateForAuthorizationCodeRequest2(*(void**)(&clientId), *(void**)(&redirectUri), &result)); return winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult::ResponseUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_ResponseUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult::Response() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_Response(&value)); return winrt::Microsoft::Security::Authentication::OAuth::AuthResponse{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthRequestResult::Failure() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthRequestResult)->get_Failure(&value)); return winrt::Microsoft::Security::Authentication::OAuth::AuthFailure{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::State() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_State(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::Code() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_Code(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::AccessToken() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_AccessToken(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::TokenType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_TokenType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::ExpiresIn() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_ExpiresIn(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::Scope() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_Scope(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IAuthResponse::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IAuthResponse)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication::Authorization() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_Authorization(&value)); return winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication::Authorization(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->put_Authorization(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication::ProxyAuthorization() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_ProxyAuthorization(&value)); return winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication::ProxyAuthorization(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->put_ProxyAuthorization(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthentication::AdditionalHeaders() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthentication)->get_AdditionalHeaders(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthenticationFactory::CreateInstance(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& authorization) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationFactory)->CreateInstance(*(void**)(&authorization), &value)); return winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IClientAuthenticationStatics::CreateForBasicAuthorization(param::hstring const& clientId, param::hstring const& clientSecret) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IClientAuthenticationStatics)->CreateForBasicAuthorization(*(void**)(&clientId), *(void**)(&clientSecret), &result)); return winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics::RequestAuthWithParamsAsync(winrt::Microsoft::UI::WindowId const& parentWindowId, winrt::Windows::Foundation::Uri const& authEndpoint, winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams const& params) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestAuthWithParamsAsync(impl::bind_in(parentWindowId), *(void**)(&authEndpoint), *(void**)(¶ms), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics::CompleteAuthRequest(winrt::Windows::Foundation::Uri const& responseUri) const { bool result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->CompleteAuthRequest(*(void**)(&responseUri), &result)); return result; } template auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestTokenAsync(*(void**)(&tokenEndpoint), *(void**)(¶ms), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_IOAuth2ManagerStatics::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params, winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication const& clientAuth) const { void* operation{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::IOAuth2ManagerStatics)->RequestTokenAsync2(*(void**)(&tokenEndpoint), *(void**)(¶ms), *(void**)(&clientAuth), &operation)); return winrt::Windows::Foundation::IAsyncOperation{ operation, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::Kind() const { winrt::Microsoft::Security::Authentication::OAuth::TokenFailureKind value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_Kind(reinterpret_cast(&value))); return value; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::ErrorCode() const { winrt::hresult value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorCode(put_abi(value))); return value; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::Error() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_Error(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::ErrorDescription() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorDescription(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::ErrorUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_ErrorUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenFailure::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenFailure)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::GrantType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_GrantType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::GrantType(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_GrantType(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Code() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Code(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Code(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Code(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::RedirectUri() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_RedirectUri(&value)); return winrt::Windows::Foundation::Uri{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::RedirectUri(winrt::Windows::Foundation::Uri const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_RedirectUri(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::CodeVerifier() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_CodeVerifier(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::CodeVerifier(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_CodeVerifier(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::ClientId() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_ClientId(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::ClientId(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_ClientId(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Username() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Username(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Username(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Username(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Password() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Password(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Password(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Password(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Scope() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_Scope(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::Scope(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_Scope(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::RefreshToken() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_RefreshToken(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::RefreshToken(param::hstring const& value) const { check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->put_RefreshToken(*(void**)(&value))); } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParams::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParams)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMap{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsFactory::CreateInstance(param::hstring const& grantType) const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsFactory)->CreateInstance(*(void**)(&grantType), &value)); return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics::CreateForAuthorizationCodeRequest(winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const& authResponse) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForAuthorizationCodeRequest(*(void**)(&authResponse), &result)); return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics::CreateForClientCredentials() const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForClientCredentials(&result)); return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics::CreateForExtension(winrt::Windows::Foundation::Uri const& extensionUri) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForExtension(*(void**)(&extensionUri), &result)); return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestParamsStatics::CreateForRefreshToken(param::hstring const& refreshToken) const { void* result{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestParamsStatics)->CreateForRefreshToken(*(void**)(&refreshToken), &result)); return winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams{ result, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult::ResponseMessage() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_ResponseMessage(&value)); return winrt::Windows::Web::Http::HttpResponseMessage{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult::Response() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_Response(&value)); return winrt::Microsoft::Security::Authentication::OAuth::TokenResponse{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenRequestResult::Failure() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenRequestResult)->get_Failure(&value)); return winrt::Microsoft::Security::Authentication::OAuth::TokenFailure{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::AccessToken() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_AccessToken(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::TokenType() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_TokenType(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::ExpiresIn() const { double value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_ExpiresIn(&value)); return value; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::RefreshToken() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_RefreshToken(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::Scope() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_Scope(&value)); return hstring{ value, take_ownership_from_abi }; } template auto consume_Microsoft_Security_Authentication_OAuth_ITokenResponse::AdditionalParams() const { void* value{}; check_hresult(WINRT_IMPL_SHIM(winrt::Microsoft::Security::Authentication::OAuth::ITokenResponse)->get_AdditionalParams(&value)); return winrt::Windows::Foundation::Collections::IMapView{ value, take_ownership_from_abi }; } #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Error(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Error()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResponseType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResponseType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ResponseType(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ResponseType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RedirectUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RedirectUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RedirectUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RedirectUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_State(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_State(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().State(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scope(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scope()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Scope(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Scope(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CodeChallenge(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CodeChallenge()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CodeChallenge(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CodeChallenge(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CodeChallengeMethod(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CodeChallengeMethod()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CodeChallengeMethod(int32_t value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CodeChallengeMethod(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* responseType, void* clientId, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&responseType), *reinterpret_cast(&clientId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateInstance2(void* responseType, void* clientId, void* redirectUri, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance2(*reinterpret_cast(&responseType), *reinterpret_cast(&clientId), *reinterpret_cast(&redirectUri))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateForAuthorizationCodeRequest(void* clientId, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast(&clientId))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForAuthorizationCodeRequest2(void* clientId, void* redirectUri, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast(&clientId), *reinterpret_cast(&redirectUri))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResponseUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResponseUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Response(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Response()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Failure(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Failure()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_State(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().State()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Code(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Code()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AccessToken(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccessToken()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TokenType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TokenType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExpiresIn(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpiresIn()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scope(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scope()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Authorization(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Authorization()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Authorization(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Authorization(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ProxyAuthorization(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ProxyAuthorization()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ProxyAuthorization(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ProxyAuthorization(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalHeaders(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalHeaders()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* authorization, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&authorization))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateForBasicAuthorization(void* clientId, void* clientSecret, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForBasicAuthorization(*reinterpret_cast(&clientId), *reinterpret_cast(&clientSecret))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall RequestAuthWithParamsAsync(struct struct_Microsoft_UI_WindowId parentWindowId, void* authEndpoint, void* params, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestAuthWithParamsAsync(*reinterpret_cast(&parentWindowId), *reinterpret_cast(&authEndpoint), *reinterpret_cast(¶ms))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CompleteAuthRequest(void* responseUri, bool* result) noexcept final try { typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CompleteAuthRequest(*reinterpret_cast(&responseUri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestTokenAsync(void* tokenEndpoint, void* params, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestTokenAsync(*reinterpret_cast(&tokenEndpoint), *reinterpret_cast(¶ms))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall RequestTokenAsync2(void* tokenEndpoint, void* params, void* clientAuth, void** operation) noexcept final try { clear_abi(operation); typename D::abi_guard guard(this->shim()); *operation = detach_from>(this->shim().RequestTokenAsync(*reinterpret_cast(&tokenEndpoint), *reinterpret_cast(¶ms), *reinterpret_cast(&clientAuth))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_Kind(int32_t* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Kind()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorCode(winrt::hresult* value) noexcept final try { zero_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorCode()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Error(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Error()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorDescription(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorDescription()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ErrorUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ErrorUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_GrantType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().GrantType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_GrantType(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().GrantType(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Code(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Code()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Code(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Code(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RedirectUri(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RedirectUri()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RedirectUri(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RedirectUri(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_CodeVerifier(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CodeVerifier()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_CodeVerifier(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().CodeVerifier(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ClientId(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ClientId()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_ClientId(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().ClientId(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Username(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Username()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Username(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Username(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Password(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Password()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Password(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Password(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scope(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scope()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_Scope(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().Scope(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RefreshToken(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RefreshToken()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall put_RefreshToken(void* value) noexcept final try { typename D::abi_guard guard(this->shim()); this->shim().RefreshToken(*reinterpret_cast(&value)); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateInstance(void* grantType, void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().CreateInstance(*reinterpret_cast(&grantType))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall CreateForAuthorizationCodeRequest(void* authResponse, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForAuthorizationCodeRequest(*reinterpret_cast(&authResponse))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForClientCredentials(void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForClientCredentials()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForExtension(void* extensionUri, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForExtension(*reinterpret_cast(&extensionUri))); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall CreateForRefreshToken(void* refreshToken, void** result) noexcept final try { clear_abi(result); typename D::abi_guard guard(this->shim()); *result = detach_from(this->shim().CreateForRefreshToken(*reinterpret_cast(&refreshToken))); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_ResponseMessage(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ResponseMessage()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Response(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Response()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Failure(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Failure()); return 0; } catch (...) { return to_hresult(); } }; #endif #ifndef WINRT_LEAN_AND_MEAN template struct produce : produce_base { int32_t __stdcall get_AccessToken(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().AccessToken()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_TokenType(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().TokenType()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_ExpiresIn(double* value) noexcept final try { typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().ExpiresIn()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_RefreshToken(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().RefreshToken()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_Scope(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from(this->shim().Scope()); return 0; } catch (...) { return to_hresult(); } int32_t __stdcall get_AdditionalParams(void** value) noexcept final try { clear_abi(value); typename D::abi_guard guard(this->shim()); *value = detach_from>(this->shim().AdditionalParams()); return 0; } catch (...) { return to_hresult(); } }; #endif } WINRT_EXPORT namespace winrt::Microsoft::Security::Authentication::OAuth { inline AuthRequestParams::AuthRequestParams(param::hstring const& responseType, param::hstring const& clientId) : AuthRequestParams(impl::call_factory([&](IAuthRequestParamsFactory const& f) { return f.CreateInstance(responseType, clientId); })) { } inline AuthRequestParams::AuthRequestParams(param::hstring const& responseType, param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) : AuthRequestParams(impl::call_factory([&](IAuthRequestParamsFactory const& f) { return f.CreateInstance2(responseType, clientId, redirectUri); })) { } inline auto AuthRequestParams::CreateForAuthorizationCodeRequest(param::hstring const& clientId) { return impl::call_factory([&](IAuthRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(clientId); }); } inline auto AuthRequestParams::CreateForAuthorizationCodeRequest(param::hstring const& clientId, winrt::Windows::Foundation::Uri const& redirectUri) { return impl::call_factory([&](IAuthRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(clientId, redirectUri); }); } inline ClientAuthentication::ClientAuthentication() : ClientAuthentication(impl::call_factory_cast([](winrt::Windows::Foundation::IActivationFactory const& f) { return f.template ActivateInstance(); })) { } inline ClientAuthentication::ClientAuthentication(winrt::Windows::Web::Http::Headers::HttpCredentialsHeaderValue const& authorization) : ClientAuthentication(impl::call_factory([&](IClientAuthenticationFactory const& f) { return f.CreateInstance(authorization); })) { } inline auto ClientAuthentication::CreateForBasicAuthorization(param::hstring const& clientId, param::hstring const& clientSecret) { return impl::call_factory([&](IClientAuthenticationStatics const& f) { return f.CreateForBasicAuthorization(clientId, clientSecret); }); } inline auto OAuth2Manager::RequestAuthWithParamsAsync(winrt::Microsoft::UI::WindowId const& parentWindowId, winrt::Windows::Foundation::Uri const& authEndpoint, winrt::Microsoft::Security::Authentication::OAuth::AuthRequestParams const& params) { return impl::call_factory([&](IOAuth2ManagerStatics const& f) { return f.RequestAuthWithParamsAsync(parentWindowId, authEndpoint, params); }); } inline auto OAuth2Manager::CompleteAuthRequest(winrt::Windows::Foundation::Uri const& responseUri) { return impl::call_factory([&](IOAuth2ManagerStatics const& f) { return f.CompleteAuthRequest(responseUri); }); } inline auto OAuth2Manager::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params) { return impl::call_factory([&](IOAuth2ManagerStatics const& f) { return f.RequestTokenAsync(tokenEndpoint, params); }); } inline auto OAuth2Manager::RequestTokenAsync(winrt::Windows::Foundation::Uri const& tokenEndpoint, winrt::Microsoft::Security::Authentication::OAuth::TokenRequestParams const& params, winrt::Microsoft::Security::Authentication::OAuth::ClientAuthentication const& clientAuth) { return impl::call_factory([&](IOAuth2ManagerStatics const& f) { return f.RequestTokenAsync(tokenEndpoint, params, clientAuth); }); } inline TokenRequestParams::TokenRequestParams(param::hstring const& grantType) : TokenRequestParams(impl::call_factory([&](ITokenRequestParamsFactory const& f) { return f.CreateInstance(grantType); })) { } inline auto TokenRequestParams::CreateForAuthorizationCodeRequest(winrt::Microsoft::Security::Authentication::OAuth::AuthResponse const& authResponse) { return impl::call_factory([&](ITokenRequestParamsStatics const& f) { return f.CreateForAuthorizationCodeRequest(authResponse); }); } inline auto TokenRequestParams::CreateForClientCredentials() { return impl::call_factory_cast([](ITokenRequestParamsStatics const& f) { return f.CreateForClientCredentials(); }); } inline auto TokenRequestParams::CreateForExtension(winrt::Windows::Foundation::Uri const& extensionUri) { return impl::call_factory([&](ITokenRequestParamsStatics const& f) { return f.CreateForExtension(extensionUri); }); } inline auto TokenRequestParams::CreateForRefreshToken(param::hstring const& refreshToken) { return impl::call_factory([&](ITokenRequestParamsStatics const& f) { return f.CreateForRefreshToken(refreshToken); }); } } namespace std { #ifndef WINRT_LEAN_AND_MEAN template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; template<> struct hash : winrt::impl::hash_base {}; #endif #ifdef __cpp_lib_format #endif } #endif