X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=README.md;h=9a67a6d2ffa05db8463c89820d08ec8e1cabdb49;hb=004d338e7c2e4003de6c0baa2552c27221e2be39;hp=bd005a7e83b23355752f82d1e78e9e0d6845d93c;hpb=8daa668e5a0485b5f0e2b07203d9fb237d7f761c;p=squeep-indieauth-helper diff --git a/README.md b/README.md index bd005a7..9a67a6d 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,23 @@ # IndieAuth Helper -Just some abstractions for interacting with IndieAuth sites. +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. + +This is currently quite opinionated, and likely is only really useful in the context of Squeep Framework Applications. Notable methods on the Communication class: - `static async generatePKCE(length)` Create a code and verifier for use in an IndieAuth transaction. +- `async validateProfile(url)` + Check that a url meets specification requirements to be a profile. + - `async fetchProfile(urlObject)` Retrieve profile information from an endpoint. +- `async validateClientIdentifier(url)` + Check that a url meets specification requirements to be a client identifier. + - `async fetchClientIdentifier(urlObject)` Retrieve client identifier information from an endpoint. @@ -18,3 +26,15 @@ Notable methods on the Communication class: - `async fetchJSON(urlObject)` Retrieve json from an endpoint. + +- `async redeemCode(urlObj, code, codeVerifier, clientId, redirectURI)` + Submit a code to get a profile or ticket response. + +- `async introspectToken(introspectionUrlObj, authenticationHeader, token)` + Submit a token for introspection. + +- `async deliverTicket(ticketEndpointUrlObj, resourceUrlObj, subjectUrlObj, ticket)` + Submit a ticket offer. + +- `async redeemTicket(ticket, resourceUrlObj, issuerUrlObj)` + Exchange a ticket for an access token to the given resource.