Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
grpc::ServerCredentials Class Referenceabstract

Wrapper around grpc_server_credentials, a way to authenticate a server. More...

#include <server_credentials.h>

Inheritance diagram for grpc::ServerCredentials:
Inheritance graph
[legend]

Public Member Functions

def __init__ (self, credentials)
 
 ServerCredentials ()
 
virtual void SetAuthMetadataProcessor (const std::shared_ptr< grpc::AuthMetadataProcessor > &processor)=0
 
 ~ServerCredentials () override
 

Private Member Functions

virtual int AddPortToServer (const std::string &addr, grpc_server *server)=0
 
virtual SecureServerCredentialsAsSecureServerCredentials ()
 
virtual bool IsInsecure () const
 
- Private Member Functions inherited from grpc::GrpcLibraryCodegen
 GrpcLibraryCodegen (bool call_grpc_init=true)
 
virtual ~GrpcLibraryCodegen ()
 

Private Attributes

 _credentials
 

Friends

std::shared_ptr< ServerCredentialsgrpc::XdsServerCredentials (const std::shared_ptr< ServerCredentials > &fallback_credentials)
 
class Server
 

Detailed Description

Wrapper around grpc_server_credentials, a way to authenticate a server.

An encapsulation of the data required to open a secure port on a Server.

This class has no supported interface - it exists to define the type of its
instances and its instances exist to be passed to other functions.

Definition at line 76 of file include/grpcpp/security/server_credentials.h.

Constructor & Destructor Documentation

◆ ServerCredentials()

grpc::ServerCredentials::ServerCredentials ( )

Definition at line 25 of file server_credentials.cc.

◆ ~ServerCredentials()

grpc::ServerCredentials::~ServerCredentials ( )
override

Definition at line 27 of file server_credentials.cc.

◆ __init__()

def grpc.ServerCredentials.__init__ (   self,
  credentials 
)

Definition at line 641 of file src/python/grpcio/grpc/__init__.py.

Member Function Documentation

◆ AddPortToServer()

virtual int grpc::ServerCredentials::AddPortToServer ( const std::string &  addr,
grpc_server server 
)
privatepure virtual

Tries to bind server to the given addr (eg, localhost:1234, 192.168.1.1:31416, [::1]:27182, etc.)

Returns
bound port number on success, 0 on failure.

Implemented in grpc::SecureServerCredentials.

◆ AsSecureServerCredentials()

virtual SecureServerCredentials* grpc::ServerCredentials::AsSecureServerCredentials ( )
inlineprivatevirtual

◆ IsInsecure()

virtual bool grpc::ServerCredentials::IsInsecure ( ) const
inlineprivatevirtual

◆ SetAuthMetadataProcessor()

virtual void grpc::ServerCredentials::SetAuthMetadataProcessor ( const std::shared_ptr< grpc::AuthMetadataProcessor > &  processor)
pure virtual

This method is not thread-safe and has to be called before the server is started. The last call to this function wins.

Implemented in grpc::SecureServerCredentials.

Friends And Related Function Documentation

◆ grpc::XdsServerCredentials

std::shared_ptr<ServerCredentials> grpc::XdsServerCredentials ( const std::shared_ptr< ServerCredentials > &  fallback_credentials)
friend

◆ Server

friend class Server
friend

Definition at line 87 of file include/grpcpp/security/server_credentials.h.

Member Data Documentation

◆ _credentials

grpc.ServerCredentials._credentials
private

Definition at line 642 of file src/python/grpcio/grpc/__init__.py.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:03:31