DBAUTHAppAuthRoutes

Objective-C

@interface DBAUTHAppAuthRoutes : NSObject

Swift

class DBAUTHAppAuthRoutes : NSObject

Routes for the Auth namespace

  • An instance of the networking client that each route will use to submit a request.

    Declaration

    Objective-C

    @property (nonatomic, readonly) id<DBTransportClient> _Nonnull client;
  • Initializes the DBAUTHAppAuthRoutes namespace container object with a networking client.

    Declaration

    Objective-C

    - (nonnull instancetype)init:(nonnull id<DBTransportClient>)client;
  • Creates an OAuth 2.0 access token from the supplied OAuth 1.0 access token.

    Declaration

    Objective-C

    - (nonnull
           DBRpcTask<DBAUTHTokenFromOAuth1Result *, DBAUTHTokenFromOAuth1Error *> *)
          tokenFromOauth1:(nonnull NSString *)oauth1Token
        oauth1TokenSecret:(nonnull NSString *)oauth1TokenSecret;

    Swift

    func token(fromOauth1 oauth1Token: String, oauth1TokenSecret: String) -> DBRpcTask<DBAUTHTokenFromOAuth1Result, DBAUTHTokenFromOAuth1Error>

    Parameters

    oauth1Token

    The supplied OAuth 1.0 access token.

    oauth1TokenSecret

    The token secret associated with the supplied access token.

    Return Value

    Through the response callback, the caller will receive a DBAUTHTokenFromOAuth1Result object on success or a DBAUTHTokenFromOAuth1Error object on failure.