YRTAccount
|
@protocol YRTAccount <NSObject> |
Summary
Instance methods
|
- (nonnull NSString *)uid; This method may be called on any thread |
|
- (void)requestTokenWithTokenListener:(nonnull YRTTokenDelegate *)tokenListener; |
|
- (void)invalidateToken:(nonnull NSString *)token; |
|
- (nullable NSString *)httpAuthWithToken:(nonnull NSString *)token; |
Instance methods
uid
|
- (nonnull NSString *)uid; |
Get the user's UID
This method may be called on any thread. Its implementation must be thread-safe.
requestTokenWithTokenListener:
|
- (void)requestTokenWithTokenListener:(nonnull YRTTokenDelegate *)tokenListener; |
Makes a token request for the provider. This method may be called often (per each request). For best perfomance your implementation should cache the token. See YRTTokenDelegate for additional information.
This method may be called on any thread. Its implementation must be thread-safe.
invalidateToken:
|
- (void)invalidateToken:(nonnull NSString *)token; |
Invalidates the OAuth token for an active account. The next token request occurs on a new OAuth token request from XToken.
This method may be called on any thread. Its implementation must be thread-safe.
httpAuthWithToken:
|
- (nullable NSString *)httpAuthWithToken:(nonnull NSString *)token; |
Creates the HTTP authorization header for requests. return null if default authorization needed ('OAuth token').
This method may be called on any thread. Its implementation must be thread-safe.