Liblinphone  5.4.0
Public Member Functions | List of all members
linphone::BearerToken Class Reference

Object that represents a bearer token (eg OAUTH). More...

#include <bearer_token.hh>

Inheritance diagram for linphone::BearerToken:

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...
 

Detailed Description

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.

Member Function Documentation

◆ getExpirationTime()

LINPHONECXX_PUBLIC time_t linphone::BearerToken::getExpirationTime ( ) const

Get the token exiration time, as a number of seconds since EPOCH.

Returns
the expiration time

◆ getToken()

LINPHONECXX_PUBLIC std::string linphone::BearerToken::getToken ( ) const

Get the token as a string.

Returns
the token.

The documentation for this class was generated from the following file: