summaryrefslogtreecommitdiffstats
path: root/library/cpp/tvmauth/deprecated/user_context.cpp
blob: 5ff7714db538451c6c573af556a6d72a0edbbada (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <library/cpp/tvmauth/checked_user_ticket.h> 
#include <library/cpp/tvmauth/src/user_impl.h> 
 
namespace NTvmAuth { 
    static const char* EX_MSG = "UserContext already moved out"; 
 
    TUserContext::TUserContext(EBlackboxEnv env, TStringBuf tvmKeysResponse) 
        : Impl_(MakeHolder<TImpl>(env, tvmKeysResponse)) 
    { 
    } 
 
    TUserContext::TUserContext(TUserContext&& o) = default; 
    TUserContext& TUserContext::operator=(TUserContext&& o) = default; 
    TUserContext::~TUserContext() = default; 
 
    TCheckedUserTicket TUserContext::Check(TStringBuf ticketBody) const { 
        Y_ENSURE(Impl_, EX_MSG); 
        return Impl_->Check(ticketBody); 
    } 
}