Everything the tool knows about a registered platform, established out-of-band before any launch occurs.
A registration captures the values exchanged during out-of-band setup
between the tool and platform. Multiple deployments on a given platform
may share the same client_id.
Fields
:issuer— HTTPS URL identifying the platform (no query or fragment):client_id— OAuth client ID assigned by the platform:auth_endpoint— HTTPS URL for the OIDC authorization endpoint:jwks_uri— HTTPS URL where the platform publishes its public keys:token_endpoint— HTTPS URL for OAuth token requests (required for Advantage services;nilif not using them):tool_jwk— the tool's private signing key (JOSE.JWK.t()), used to sign client assertion JWTs. Generate one withLtix.JWK.generate_key_pair/1and serve the matching public key from your JWKS endpoint.
Examples
{:ok, reg} = Ltix.Registration.new(%{
issuer: "https://canvas.example.edu",
client_id: "10000000000042",
auth_endpoint: "https://canvas.example.edu/api/lti/authorize_redirect",
jwks_uri: "https://canvas.example.edu/api/lti/security/jwks",
token_endpoint: "https://canvas.example.edu/login/oauth2/token",
tool_jwk: tool_private_key
})
Summary
Functions
Create a new registration with validation.
Types
Functions
@spec new(map()) :: {:ok, t()} | {:error, Exception.t()}
Create a new registration with validation.
Validation rules
issuer— HTTPS URL with no query or fragmentclient_id— non-empty stringauth_endpoint— HTTPS URLjwks_uri— HTTPS URLtoken_endpoint— HTTPS URL (when present)tool_jwk—JOSE.JWK.t()(the tool's private signing key for this registration)
Examples
iex> {:ok, reg} = Ltix.Registration.new(%{
...> issuer: "https://platform.example.com",
...> client_id: "tool-123",
...> auth_endpoint: "https://platform.example.com/auth",
...> jwks_uri: "https://platform.example.com/.well-known/jwks.json",
...> tool_jwk: elem(Ltix.JWK.generate_key_pair(), 0)
...> })
iex> reg.issuer
"https://platform.example.com"