AccessTokenConfig

@interface AccessTokenConfig : NSObject

Helps building an access token payload.

  • Creates a new instance with a provided grantee alias.

    Declaration

    Objective-C

    + (AccessTokenConfig *)create:(Alias *)toAlias;

    Swift

    class func create(_ toAlias: Alias!) -> AccessTokenConfig!

    Parameters

    toAlias

    alias of the token grantee.

  • Creates a new instance with a provided grantee id.

    Declaration

    Objective-C

    + (AccessTokenConfig *)createWithToId:(NSString *)toId;

    Swift

    class func createWith(toId: String!) -> AccessTokenConfig!

    Parameters

    toId

    id of the token grantee

  • Creates a new instance from an existing token payload.

    Declaration

    Objective-C

    + (AccessTokenConfig *)fromPayload:(TokenPayload *)payloadToInitFrom;

    Swift

    class func fromPayload(_ payloadToInitFrom: TokenPayload!) -> AccessTokenConfig!

    Parameters

    payloadToInitFrom

    token payload to initialize the config from

  • Creates a new instance with a provided grantee alias.

    Declaration

    Objective-C

    - (id)initWithToAlias:(Alias *)toAlias;

    Swift

    init!(to toAlias: Alias!)

    Parameters

    toAlias

    alias of the token grantee

  • Creates a new instance from an existing token payload.

    Declaration

    Objective-C

    - (id)initWithPayload:(TokenPayload *)payloadToInitFrom;

    Swift

    init!(payload payloadToInitFrom: TokenPayload!)

    Parameters

    payloadToInitFrom

    token payload to initialize the config from

  • Sets ‘from’ field on the payload.

    Declaration

    Objective-C

    - (void)from:(NSString *)memberId;

    Swift

    func from(_ memberId: String!)

    Parameters

    memberId

    token member ID to set

  • Grants access to all addresses.

    Declaration

    Objective-C

    - (void)forAllAddresses;

    Swift

    func forAllAddresses()
  • Grants access to a given addressId.

    Declaration

    Objective-C

    - (void)forAddress:(NSString *)addressId;

    Swift

    func forAddress(_ addressId: String!)

    Parameters

    addressId

    address to grant access to

  • Grants access to all accounts.

    Declaration

    Objective-C

    - (void)forAllAccounts;

    Swift

    func forAllAccounts()
  • Grants access to a given accountId.

    Declaration

    Objective-C

    - (void)forAccount:(NSString *)accountId;

    Swift

    func forAccount(_ accountId: String!)

    Parameters

    accountId

    account to grant access to

  • Grants access to all transactions.

    Declaration

    Objective-C

    - (void)forAllTransactions;

    Swift

    func forAllTransactions()
  • Grants access to a given account transactions.

    Declaration

    Objective-C

    - (void)forAccountTransactions:(NSString *)accountId;

    Swift

    func forAccountTransactions(_ accountId: String!)

    Parameters

    accountId

    account to grant access to transactions

  • Grants access to all balances.

    Declaration

    Objective-C

    - (void)forAllBalances;

    Swift

    func forAllBalances()
  • Grants access to a given account balances.

    Declaration

    Objective-C

    - (void)forAccountBalances:(NSString *)accountId;

    Swift

    func forAccountBalances(_ accountId: String!)

    Parameters

    accountId

    account to grant access to balances

  • Grants access to ALL resources (aka wildcard permissions).

    Declaration

    Objective-C

    - (void)forAll;

    Swift

    func forAll()
  • Set entity redeemer is acting on behalf of.

    Declaration

    Objective-C

    - (void)actingAs:(TokenPayload_ActingAs *)actingAs;

    Swift

    func acting(_ actingAs: TokenPayload_ActingAs!)

    Parameters

    actingAs

    entity redeemer is acting on behalf of.

  • Converts configuration to TokenPayload object.

    Declaration

    Objective-C

    - (TokenPayload *)toTokenPayload;

    Swift

    func toTokenPayload() -> TokenPayload!

    Return Value

    TokenPayload object