aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/type.h
blob: acf0f9e1aad04caff5764d7cc6edceaf6ee6c96e (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
#pragma once

#include <library/cpp/containers/stack_vector/stack_vec.h>

#include <util/generic/hash.h>

namespace NTvmAuth {
    struct TUserExtFields;

    using TScopes = TSmallVec<TStringBuf>;
    using TTvmId = ui32;
    using TUid = ui64;
    using TUids = TSmallVec<TUid>;
    using TUidsExtFieldsMap = THashMap<TUid, TUserExtFields>;
    using TAlias = TString;
    using TPorgId = ui64;

    struct TUserExtFields {
        bool operator==(const TUserExtFields& o) const {
            return Uid == o.Uid &&
                   CurrentPorgId == o.CurrentPorgId;
        }

        TUid Uid = 0;
        TPorgId CurrentPorgId = 0;
    };
}