Package org.linphone.core
Interface BearerToken
public interface BearerToken
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
expiration time and target server name for which it is intended to use, then
passed into a
represented. If both are provided to the
automatically uses the refresh token to obtain a new access token when the
latter is expired.
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 itsexpiration time and target server name for which it is intended to use, then
passed into a
AuthInfo
object. Both access and refresh tokens may berepresented. If both are provided to the
AuthInfo
, then liblinphoneautomatically uses the refresh token to obtain a new access token when the
latter is expired.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Get the token exiration time, as a number of seconds since EPOCH.long
Gets the native pointer used by this class to make native method calls.getToken()
Get the token as a string.Gets the object stored in this object user's datavoid
setUserData
(Object data) Sets the object to store in this object user's datatoString()
-
Method Details
-
getExpirationTime
long getExpirationTime()Get the token exiration time, as a number of seconds since EPOCH.
- Returns:
- the expiration time
-
getToken
Get the token as a string.
- Returns:
- the token.
-
setUserData
Sets the object to store in this object user's data- Parameters:
data
- the object to store
-
getUserData
Object getUserData()Gets the object stored in this object user's data- Returns:
- the object store if any, null otherwise
-
getNativePointer
long getNativePointer()Gets the native pointer used by this class to make native method calls.- Returns:
- the nativer pointer, as long
-
toString
String toString()
-