aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/deprecated/user_context.h
blob: 3b2503b9b125686faef6a7e8ceb59c2441ecf32b (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
28
29
30
#pragma once 
 
#include <library/cpp/tvmauth/checked_user_ticket.h> 
 
#include <util/generic/ptr.h> 
 
namespace NTvmAuth { 
    class TUserContext: public TAtomicRefCount<TUserContext> { 
    public: 
        TUserContext(EBlackboxEnv env, TStringBuf tvmKeysResponse); 
        TUserContext(TUserContext&&); 
        ~TUserContext(); 
 
        TUserContext& operator=(TUserContext&&); 
 
        /*! 
         * Parse and validate user ticket body then create TCheckedUserTicket object. 
         * @param ticketBody 
         * @return TCheckedUserTicket object 
         */ 
        TCheckedUserTicket Check(TStringBuf ticketBody) const; 
 
        class TImpl; 
 
    private: 
        THolder<TImpl> Impl_; 
    }; 
 
    using TUserContextPtr = TIntrusiveConstPtr<TUserContext>; 
}