update devDependencies, eslint config, address lint issues
[squeep-indieauth-helper] / README.md
1 # IndieAuth Helper
2
3 Just some abstractions for interacting with IndieAuth sites, basically wrapping `got` and `microformats-parser` mf2 parsing, performing various validations according to the specification, and some other fiddly bits.
4
5 This is currently quite opinionated, and likely is only really useful in the context of Squeep Framework Applications.
6
7 Notable methods on the Communication class:
8
9 - `static async generatePKCE(length)`
10 Create a code and verifier for use in an IndieAuth transaction.
11
12 - `async validateProfile(url)`
13 Check that a url meets specification requirements to be a profile.
14
15 - `async fetchProfile(urlObject)`
16 Retrieve profile information from an endpoint.
17
18 - `async validateClientIdentifier(url)`
19 Check that a url meets specification requirements to be a client identifier.
20
21 - `async fetchClientIdentifier(urlObject)`
22 Retrieve client identifier information from an endpoint.
23
24 - `async fetchMicroformat(urlObject)`
25 Retrieve all mf2 information from an endpoint.
26
27 - `async fetchJSON(urlObject)`
28 Retrieve json from an endpoint.
29
30 - `async redeemCode(urlObj, code, codeVerifier, clientId, redirectURI)`
31 Submit a code to get a profile or ticket response.
32
33 - `async introspectToken(introspectionUrlObj, authenticationHeader, token)`
34 Submit a token for introspection.
35
36 - `async deliverTicket(ticketEndpointUrlObj, resourceUrlObj, subjectUrlObj, ticket)`
37 Submit a ticket offer.
38
39 - `async redeemTicket(ticket, resourceUrlObj, issuerUrlObj)`
40 Exchange a ticket for an access token to the given resource.