summaryrefslogtreecommitdiffstats
path: root/src/web_service/verify_user_jwt.h
blob: ec3cc2904354a672a5fe9136b6ae91a6c1b74914 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Copyright 2018 Citra Emulator Project
// Licensed under GPLv2 or any later version
// Refer to the license.txt file included.

#pragma once

#include <fmt/format.h>
#include "network/verify_user.h"
#include "web_service/web_backend.h"

namespace WebService {

std::string GetPublicKey(const std::string& host);

class VerifyUserJWT final : public Network::VerifyUser::Backend {
public:
    VerifyUserJWT(const std::string& host);
    ~VerifyUserJWT() = default;

    Network::VerifyUser::UserData LoadUserData(const std::string& verify_uid,
                                               const std::string& token) override;

private:
    std::string pub_key;
};

} // namespace WebService