Class ProviderAbstract

Hierarchy

Constructors

Properties

delToken: DelToken
getToken: GetToken
getTokens: GetTokens

Set to the unique hostname of the provider

preferGetClaimsPage: boolean = false

Set to true if getClaimsPage method should be preferred instead claim iteration operations. This could be useful if the Provider subclass has a getClaimsPage implentation that is able to obtain both Claims and ClaimsIds with a single HTTP request. For example, if the Provider were to supply a GraphQL API, or if the webscraped page were to contain the contents of both.

putToken: PutToken

Methods

  • Checks that the token is still valid If the access token has expired, and there is no refresh token then this will throw the ErrorProviderUnauthenticated exception If the refresh token exists but has expired then this will throw the ErrorProviderUnauthenticated exception If the refresh token exists, and is still valid, then it will attempt to refresh the token. If you pass in identityId, expect that the new token will be persisted. If either providerToken.accessTokenExpiresIn or providerToken.refreshTokenExpiresIn is set to 0, their related tokens will be treated as never-expiring.

    Parameters

    Returns Promise<ProviderToken>

  • Stream connected identity infos to a particular identity This is intended to find "friends", "followers", "contacts"... etc Some social providers do not have this concept In such a case, one stream other random identities that exist on the network Search terms are provider-implementation specific

    Parameters

    • authIdentityId: IdentityId
    • Optional searchTerms: string[]

    Returns AsyncGenerator<IdentityData, any, unknown>

  • Setting up token database functions This must be called before the provider starts to be used

    Parameters

    • getTokens: GetTokens
    • getToken: GetToken
    • putToken: PutToken
    • delToken: DelToken

    Returns void

Generated using TypeDoc