> Aztec.nr API reference, v6.0.0 (mainnet and testnet). Index: https://docs.aztec.network/aztec-nr-api/v6.0.0/llms.txt

# Function assert_current_call_valid_authwit_public

Module: `noir_aztec::authwit::auth`

```rust
pub unconstrained fn assert_current_call_valid_authwit_public(
    context: PublicContext,
    on_behalf_of: AztecAddress,
)
```

Assert that `on_behalf_of` has authorized the current call in the authentication registry

Compute the `inner_hash` using the `msg_sender`, `selector` and `args_hash` and then make a call out to the `on_behalf_of` contract to verify that the `inner_hash` is valid.

Note that the authentication registry will take the `msg_sender` into account as the consumer, so this will only work if the `msg_sender` is the same as the `consumer` when the `message_hash` was inserted into the registry.

@param on_behalf_of The address that has allegedly authorized the current call
