v1.4.4
This commit is contained in:
commit
9c94d113d3
10260 changed files with 1237388 additions and 0 deletions
46
attic/old_source/StarAuthentication.hpp
Normal file
46
attic/old_source/StarAuthentication.hpp
Normal file
|
@ -0,0 +1,46 @@
|
|||
#ifndef STAR_AUTHENTICATION_HPP
|
||||
#define STAR_AUTHENTICATION_HPP
|
||||
|
||||
#include "StarVariant.hpp"
|
||||
#include "StarThread.hpp"
|
||||
|
||||
namespace Star {
|
||||
|
||||
STAR_CLASS(AuthenticationImpl);
|
||||
STAR_CLASS(SharedClaim);
|
||||
STAR_CLASS(Authentication);
|
||||
|
||||
class SharedClaim {
|
||||
public:
|
||||
virtual ~SharedClaim() {};
|
||||
virtual bool validateClaim() = 0;
|
||||
|
||||
virtual Variant claim() = 0;
|
||||
virtual String encrypt(String const& message) = 0;
|
||||
virtual bool verify(String const& message, String const& signature) = 0;
|
||||
|
||||
virtual String username() = 0;
|
||||
};
|
||||
|
||||
class Authentication {
|
||||
public:
|
||||
void load();
|
||||
|
||||
bool validateClaim(bool remoteValidate);
|
||||
bool logon(String const& username, String const& passwordHash);
|
||||
|
||||
Variant claim();
|
||||
|
||||
String decrypt(String const& message);
|
||||
String sign(String const& message);
|
||||
|
||||
SharedClaimPtr sharedClaim(Variant const& data);
|
||||
|
||||
private:
|
||||
AuthenticationImplPtr m_impl;
|
||||
Mutex m_mutex;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue