Hierarchy

Constructors

Properties

apiUrl: string = 'https://api.github.com'
clientId: string
delToken: DelToken
getToken: GetToken
getTokens: GetTokens
gistDescription: string = 'Cryptolink between Polykey Keynode and Github Identity'
gistFilename: string = 'cryptolink.txt'
id: ProviderId = ...

Set to the unique hostname of the provider

logger: Logger
putToken: PutToken
scope: string = 'gist user:email read:user'

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.

    Parameters

    Returns Promise<ProviderToken>

  • 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