Liblinphone
5.4.0
|
Object that represents a bearer token (eg OAUTH). More...
#include <bearer_token.hh>
Public Member Functions | |
LINPHONECXX_PUBLIC | BearerToken (void *ptr, bool takeRef=true) |
LINPHONECXX_PUBLIC _LinphoneBearerToken * | cPtr () |
LINPHONECXX_PUBLIC time_t | getExpirationTime () const |
Get the token exiration time, as a number of seconds since EPOCH. More... | |
LINPHONECXX_PUBLIC std::string | getToken () const |
Get the token as a string. More... | |
Object that represents a bearer token (eg OAUTH).
SIP servers may support "bearer" kind of authentication, in which case an authentication token needs to be supplied in order to authenticate to the SIP service. Applications are responsible to obtain the token from an authentication server. In order to pass it to liblinphone for usage, the token needs to be encapsulated into a BearerToken, together with its expiration time and target server name for which it is intended to use, then passed into a AuthInfo object. Both access and refresh tokens may be represented. If both are provided to the AuthInfo, then liblinphone automatically uses the refresh token to obtain a new access token when the latter is expired.
LINPHONECXX_PUBLIC time_t linphone::BearerToken::getExpirationTime | ( | ) | const |
Get the token exiration time, as a number of seconds since EPOCH.
LINPHONECXX_PUBLIC std::string linphone::BearerToken::getToken | ( | ) | const |
Get the token as a string.