---
title: llarp::service::IAuthPolicy

---

# llarp::service::IAuthPolicy





Inherited by [llarp::rpc::EndpointAuthRPC](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md)

## Public Functions

|                | Name           |
| -------------- | -------------- |
| virtual | **[~IAuthPolicy](Classes/structllarp_1_1service_1_1IAuthPolicy.md#function-~iauthpolicy)**() =default |
| virtual void | **[AuthenticateAsync](Classes/structllarp_1_1service_1_1IAuthPolicy.md#function-authenticateasync)**(std::shared_ptr< [ProtocolMessage](Classes/structllarp_1_1service_1_1ProtocolMessage.md) > msg, std::function< void([AuthResult](Classes/structllarp_1_1service_1_1AuthResult.md))> hook) =0<br>asynchronously determine if we accept new convotag from remote service, call hook with result later  |
| virtual bool | **[AsyncAuthPending](Classes/structllarp_1_1service_1_1IAuthPolicy.md#function-asyncauthpending)**([ConvoTag](Classes/structllarp_1_1service_1_1ConvoTag.md) tag) const =0<br>return true if we are asynchronously processing authentication on this convotag  |

## Public Functions Documentation

### function ~IAuthPolicy

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


### function AuthenticateAsync

```cpp
virtual void AuthenticateAsync(
    std::shared_ptr< ProtocolMessage > msg,
    std::function< void(AuthResult)> hook
) =0
```

asynchronously determine if we accept new convotag from remote service, call hook with result later 

### function AsyncAuthPending

```cpp
virtual bool AsyncAuthPending(
    ConvoTag tag
) const =0
```

return true if we are asynchronously processing authentication on this convotag 

**Reimplemented by**: [llarp::rpc::EndpointAuthRPC::AsyncAuthPending](Classes/structllarp_1_1rpc_1_1EndpointAuthRPC.md#function-asyncauthpending)


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

Updated on 2022-10-17 at 13:14:50 +0000