Class: OmniAuth::Atproto::MetadataGenerator

Inherits:
Object
  • Object
show all
Defined in:
lib/omniauth-atproto/metadata_generator.rb

Class Method Summary collapse

Class Method Details

.generate(options) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/omniauth-atproto/metadata_generator.rb', line 4

def self.generate(options)
  {
    client_id: options[:client_id],
    application_type: "web",
    client_name: options[:client_name],
    client_uri: options[:client_uri],
    dpop_bound_access_tokens: true,
    grant_types: ["authorization_code", "refresh_token"],
    redirect_uris: [options[:redirect_uri]],
    response_types: ["code"],
    scope: options[:scope] || "atproto transition:generic",
    token_endpoint_auth_method: "private_key_jwt",
    token_endpoint_auth_signing_alg: "ES256",
    jwks: {
      keys: [options[:client_jwk]]
    }
  }
end