Skip to main content
This release is 5 versions behind 1.0.2 — the latest version of @fedify/fedify. Jump to latest

Built and signed on GitHub Actions

An ActivityPub/fediverse server framework

This package works with Node.js, Deno, Bun
This package works with Node.js
This package works with Deno
This package works with Bun
JSR Score
100%
Published
a month ago (0.15.0)
class Endpoints

Contents of Actor's endpoints.

Constructors

new
Endpoints(
values: { id?: URL | null; proxyUrl?: URL | null; oauthAuthorizationEndpoint?: URL | null; oauthTokenEndpoint?: URL | null; provideClientKey?: URL | null; signClientKey?: URL | null; sharedInbox?: URL | null; },
unnamed 1?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
)

Constructs a new instance of Endpoints with the given values.

Properties

protected
readonly
_contextLoader: DocumentLoader | undefined
protected
readonly
_documentLoader: DocumentLoader | undefined
readonly
id: URL | null

If OAuth 2.0 bearer tokens [RFC 6749] [RFC 6750] are being used for authenticating client to server interactions, this endpoint specifies a URI at which a browser-authenticated user may obtain a new authorization grant.

readonly
oauthTokenEndpoint: URL | null

If OAuth 2.0 bearer tokens [RFC 6749] [RFC 6750] are being used for authenticating client to server interactions, this endpoint specifies a URI at which a client may acquire an access token.

readonly
provideClientKey: URL | null

If Linked Data Signatures and HTTP Signatures are being used for authentication and authorization, this endpoint specifies a URI at which browser-authenticated users may authorize a client's public key for client to server interactions.

readonly
proxyUrl: URL | null

Endpoint URI so this actor's clients may access remote ActivityStreams objects which require authentication to access. To use this endpoint, the client posts an x-www-form-urlencoded id parameter with the value being the id of the requested ActivityStreams object.

readonly
sharedInbox: URL | null

An optional endpoint used for wide delivery of publicly addressed activities and activities sent to followers. sharedInbox endpoints SHOULD also be publicly readable OrderedCollection objects containing objects addressed to the Public special collection. Reading from the sharedInbox endpoint MUST NOT present objects which are not addressed to the `Public`` endpoint.

readonly
signClientKey: URL | null

If Linked Data Signatures and HTTP Signatures are being used for authentication and authorization, this endpoint specifies a URI at which a client key may be signed by the actor's key for a time window to act on behalf of the actor in interacting with foreign servers.

Methods

[Symbol.for("nodejs.util.inspect.custom")](
_depth: number,
options: unknown,
inspect: (
value: unknown,
options: unknown,
) => string
,
): string
protected
_getCustomInspectProxy(): Record<string, unknown>
clone(
values?: { id?: URL | null; proxyUrl?: URL | null; oauthAuthorizationEndpoint?: URL | null; oauthTokenEndpoint?: URL | null; provideClientKey?: URL | null; signClientKey?: URL | null; sharedInbox?: URL | null; },
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Endpoints

Clones this instance, optionally updating it with the given values.

toJsonLd(options?: { format?: "compact" | "expand"; contextLoader?: DocumentLoader; context?:
string
| Record<string, string>
| (string | Record<string, string>)[]
; }
): Promise<unknown>

Converts this object to a JSON-LD structure.

Static Properties

readonly
typeId: URL

The type URI of Endpoints: https://www.w3.org/ns/activitystreams#Endpoints.

Static Methods

fromJsonLd(
json: unknown,
options?: { documentLoader?: DocumentLoader; contextLoader?: DocumentLoader; },
): Promise<Endpoints>

Converts a JSON-LD structure to an object of this type.

Add Package

deno add jsr:@fedify/fedify

Import symbol

import { Endpoints } from "@fedify/fedify";

---- OR ----

Import directly with a jsr specifier

import { Endpoints } from "jsr:@fedify/fedify";

Add Package

npx jsr add @fedify/fedify

Import symbol

import { Endpoints } from "@fedify/fedify";

Add Package

yarn dlx jsr add @fedify/fedify

Import symbol

import { Endpoints } from "@fedify/fedify";

Add Package

pnpm dlx jsr add @fedify/fedify

Import symbol

import { Endpoints } from "@fedify/fedify";

Add Package

bunx jsr add @fedify/fedify

Import symbol

import { Endpoints } from "@fedify/fedify";