CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
credential_cache.h
1
2#pragma once
3
4#include <system/uri.h>
5#include <system/string.h>
6#include <system/shared_ptr.h>
7#include <cstdint>
8
9#include <net/network_credential.h>
10#include <net/icredentials_by_host.h>
11#include <net/icredentials.h>
12
13namespace System {
14namespace Net {
15
21{
28
30 typedef ::System::BaseTypesInfo<BaseType, BaseType1> ThisTypeBaseTypesInfo;
32 ASPOSECPP_SHARED_RTTI_INFO_DECL();
33
34public:
39
41 ASPOSECPP_SHARED_API CredentialCache();
42
47 ASPOSECPP_SHARED_API void Add(System::SharedPtr<Uri> uriPrefix, String authenticationType, System::SharedPtr<NetworkCredential> credential);
53 ASPOSECPP_SHARED_API void Add(String host, int32_t port, String authenticationType, System::SharedPtr<NetworkCredential> credential);
57 ASPOSECPP_SHARED_API void Remove(System::SharedPtr<Uri> uriPrefix, String authenticationType);
62 ASPOSECPP_SHARED_API void Remove(String host, int32_t port, String authenticationType);
66 ASPOSECPP_SHARED_API System::SharedPtr<NetworkCredential> GetCredential(System::SharedPtr<Uri> uriPrefix, String authenticationType) override;
71 ASPOSECPP_SHARED_API System::SharedPtr<NetworkCredential> GetCredential(String host, int32_t port, String authenticationType) override;
72};
73} // namespace Net
74} // namespace System
Provides the credentials storage. Objects of this class should only be allocated using System::MakeOb...
Definition: credential_cache.h:21
System::SharedPtr< NetworkCredential > GetCredential(String host, int32_t port, String authenticationType) override
Returns credentials for the specified host name, port, and authentication type.
static System::SharedPtr< ICredentials > get_DefaultCredentials()
Returns the system credentials of the application.
void Add(String host, int32_t port, String authenticationType, System::SharedPtr< NetworkCredential > credential)
Adds the specified network credentials to the cache.
System::SharedPtr< NetworkCredential > GetCredential(System::SharedPtr< Uri > uriPrefix, String authenticationType) override
Returns credentials for the specified URI prefix and authentication type.
void Remove(String host, int32_t port, String authenticationType)
Removes network credentials for the specified host name, port, and authentication type.
void Remove(System::SharedPtr< Uri > uriPrefix, String authenticationType)
Removes network credentials for the specified URI prefix and authentication type.
CredentialCache()
Constructs a new instance.
static System::SharedPtr< NetworkCredential > get_DefaultNetworkCredentials()
Returns the network credentials of the current user or application.
void Add(System::SharedPtr< Uri > uriPrefix, String authenticationType, System::SharedPtr< NetworkCredential > credential)
Adds the specified network credentials to the cache.
Provides the authentication interface for retrieving credentials for a host, port,...
Definition: icredentials_by_host.h:19
Provides the authentication interface. Objects of this class should only be allocated using System::M...
Definition: icredentials.h:18
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Definition: db_command.h:9