CCF
Loading...
Searching...
No Matches
empty_auth.h
Go to the documentation of this file.
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the Apache 2.0 License.
3#pragma once
4
6
7namespace ccf
8{
9 // To make authentication _optional_, no-auth can be listed as one of several
10 // specified policies
12 {};
13
15 {
16 public:
17 static constexpr auto SECURITY_SCHEME_NAME = "no_auth";
18
19 std::unique_ptr<AuthnIdentity> authenticate(
21 const std::shared_ptr<ccf::RpcContext>&,
22 std::string&) override;
23
25 std::shared_ptr<ccf::RpcContext>, std::string&&) override;
26
27 std::optional<OpenAPISecuritySchema> get_openapi_security_schema()
28 const override
29 {
30 return unauthenticated_schema;
31 }
32
33 std::string get_security_scheme_name() override
34 {
36 }
37 };
38}
Definition authentication_types.h:28
Definition empty_auth.h:15
std::unique_ptr< AuthnIdentity > authenticate(ccf::kv::ReadOnlyTx &, const std::shared_ptr< ccf::RpcContext > &, std::string &) override
Definition empty_auth.cpp:8
void set_unauthenticated_error(std::shared_ptr< ccf::RpcContext >, std::string &&) override
Definition empty_auth.cpp:19
std::optional< OpenAPISecuritySchema > get_openapi_security_schema() const override
Definition empty_auth.h:27
static constexpr auto SECURITY_SCHEME_NAME
Definition empty_auth.h:17
std::string get_security_scheme_name() override
Definition empty_auth.h:33
Definition tx.h:160
Definition app_interface.h:14
Definition authentication_types.h:19
Definition empty_auth.h:12