class

OAuth2::ClientRegistration

Inherits Reference < Object

Shared service for OAuth client registration.

Supports provisional storage where clients are only persisted to the database after first authorization.

Constants

OOB_REDIRECT_URI = "urn:ietf:wg:oauth:2.0:oob"

out-of-band redirect uri

Class methods

buffer_size
Source
buffer_size=(buffer_size : Int32)
Source
find(client_id : String) : Provider::Client | Nil

Finds client by client_id.

Source
persist(client : Provider::Client) : Provider::Client

Persists client to database.

Removes the client from the provisional buffer and saves it to the database if it's a new record.

Source
provisional_clients

Returns the provisional clients buffer.

For testing.

Source
register(client_name : String, redirect_uris : Array(String), scopes : String = "read") : Result

Registers a new OAuth client.

Validates input, creates a new client instance, and stores it in the provisional buffer. The client is not persisted to the database until persist is called.

Source
remove_provisional(client : Provider::Client) : Nil

Removes client from provisional storage without persisting.

Source

Nested types