Optional
logger?: LoggerProtected
Readonly
apiReadonly
clientProtected
Readonly
gistProtected
Readonly
gistReadonly
idProtected
loggerProtected
Readonly
pageReadonly
preferSet 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.
Protected
Readonly
scopeAuthenticates to an identity id, acquiring the token This token must be stored on the token database. This is a generator that only has 1 step. This is because we require the caller to perform an authorisation action. The final return value is the identity ID.
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.
Optional
identityId: IdentityIdProtected
createProtected
extractProtected
extractProtected
extractGets an array of authenticated identity ids
Gets the identity claim. GitHub identity claims are published as gists. The claimId is the gist id
Stream identity claimIds from an identity
Gets a page of ProviderIdentityClaimIds from a given identity sorted by latest.
Optional
paginationToken: ProviderPaginationTokenStream identity claims from an identity
Gets all IdentitySignedClaims from a given identity sorted by latest.
Optional
paginationToken: ProviderPaginationTokenGets connected IdentityData from following and follower connections.
Protected
getReturns a string suitable for use as the request body to the GitHub GraphQL endpoint.
This is used to construct a query that returns either the followers
or the following
of a user.
Schemas Used:
The GitHub authentication token to use when getting user data
Specify whether the GraphQL query requests the followers
or the following
of a user
Optional
cursor: stringcursor for pagination,
this can be retrieved from .data.user[identityGroup].pageinfo.endCursor
of the JSON body on a response for a request made with the return value of this method as the body.
Get identity data from a username.
Optional
signal?: AbortSignalGets own identity key. GitHub has user ids, but it is an implementation detail. Usernames on GitHub are changeable.
This verifies that the claim's JSON data fits our schema This does not verify whether the signature is correct
Publish an identity claim. These are published as gists.
Refreshes the token If identity is passed in, this function should update the token db
Generated using TypeDoc
Set to the unique hostname of the provider