* Remove unused options from rublon default config * Remove safe|secure options * Allow 9 digits long passcode for passcode bypass * Change name of 'Mobile Passcode' to 'Passcode' * Do not display any prompt when user is waiting * remove unused alloca.h header * Add autopushPrompt option * Change name OTP method * Change enrolement message handling * ad static string ctor * Addded postrm script * Rename 01_rublon_ssh.conf to 01-rublon-ssh.conf * restart sshd service after rublon package instalation * Fix sshd not restarting bug on ubuntu 24.04 * disable logging from websocket-io * change package name to match old package name * Fix compilation issue when using non owning ptr * Set version to 2.0.0
36 lines
697 B
C++
Executable File
36 lines
697 B
C++
Executable File
#pragma once
|
|
|
|
#include <cassert>
|
|
|
|
namespace rublon {
|
|
|
|
template < typename T >
|
|
class NonOwningPtr {
|
|
T * object;
|
|
|
|
public:
|
|
constexpr NonOwningPtr(T * obj) : object{obj} {}
|
|
|
|
constexpr T * get() noexcept {
|
|
assert(object != nullptr);
|
|
return object;
|
|
}
|
|
constexpr const T * get() const noexcept {
|
|
assert(object != nullptr);
|
|
return object;
|
|
}
|
|
constexpr operator const T *() const noexcept {
|
|
return get();
|
|
}
|
|
constexpr operator T *() noexcept {
|
|
return get();
|
|
}
|
|
constexpr T * operator->() {
|
|
return get();
|
|
}
|
|
constexpr const T * operator->() const {
|
|
return get();
|
|
}
|
|
};
|
|
} // namespace rublon
|