---
title: llarp::rpc::EndpointAuthRPC

---

# llarp::rpc::EndpointAuthRPC





Inherits from [llarp::service::IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md), std::enable_shared_from_this< EndpointAuthRPC >

## Public Types

|                | Name           |
| -------------- | -------------- |
| using std::shared_ptr< oxenmq::OxenMQ > | **[LMQ_ptr](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#using-lmq-ptr)**  |
| using std::shared_ptr< [llarp::service::Endpoint](Classes/structllarp_1_1service_1_1Endpoint.md) > | **[Endpoint_ptr](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#using-endpoint-ptr)**  |
| using std::unordered_set< [llarp::service::Address](Classes/structllarp_1_1service_1_1Address.md) > | **[Whitelist_t](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#using-whitelist-t)**  |

## Public Functions

|                | Name           |
| -------------- | -------------- |
| | **[EndpointAuthRPC](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-endpointauthrpc)**(std::string url, std::string method, Whitelist_t addr_whitelist, std::unordered_set< std::string > token_whitelist, LMQ_ptr lmq, Endpoint_ptr endpoint) |
| virtual | **[~EndpointAuthRPC](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-~endpointauthrpc)**() =default |
| void | **[Start](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-start)**() |
| void | **[AuthenticateAsync](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-authenticateasync)**(std::shared_ptr< [llarp::service::ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg, std::function< void([service::AuthResult](Classes/structllarp_1_1service_1_1AuthResult.md))> hook) override |
| virtual bool | **[AsyncAuthPending](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-asyncauthpending)**([service::ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag) const override<br>return true if we are asynchronously processing authentication on this convotag  |

## Additional inherited members

**Public Functions inherited from [llarp::service::IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md)**

|                | Name           |
| -------------- | -------------- |
| virtual | **[~IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md#function-~iauthpolicy)**() =default |


## Public Types Documentation

### using LMQ_ptr

```cpp
using llarp::rpc::EndpointAuthRPC::LMQ_ptr =  std::shared_ptr<oxenmq::OxenMQ>;
```


### using Endpoint_ptr

```cpp
using llarp::rpc::EndpointAuthRPC::Endpoint_ptr =  std::shared_ptr<llarp::service::Endpoint>;
```


### using Whitelist_t

```cpp
using llarp::rpc::EndpointAuthRPC::Whitelist_t =  std::unordered_set<llarp::service::Address>;
```


## Public Functions Documentation

### function EndpointAuthRPC

```cpp
explicit EndpointAuthRPC(
    std::string url,
    std::string method,
    Whitelist_t addr_whitelist,
    std::unordered_set< std::string > token_whitelist,
    LMQ_ptr lmq,
    Endpoint_ptr endpoint
)
```


### function ~EndpointAuthRPC

```cpp
virtual ~EndpointAuthRPC() =default
```


### function Start

```cpp
void Start()
```


### function AuthenticateAsync

```cpp
void AuthenticateAsync(
    std::shared_ptr< llarp::service::ProtocolMessage > msg,
    std::function< void(service::AuthResult)> hook
) override
```


### function AsyncAuthPending

```cpp
virtual bool AsyncAuthPending(
    service::ConvoTag tag
) const override
```

return true if we are asynchronously processing authentication on this convotag 

**Reimplements**: [llarp::service::IAuthPolicy::AsyncAuthPending](Classes/structllarp_1_1service_1_1IAuthPolicy.md#function-asyncauthpending)


-------------------------------

Updated on 2023-02-01 at 20:39:32 +0000