Class: MethodRuby::Resources::Teams::Mle

Inherits:
Object
  • Object
show all
Defined in:
lib/method_ruby/resources/teams/mle.rb,
lib/method_ruby/resources/teams/mle/public_keys.rb

Overview

Public key discovery endpoints for Message-Level Encryption.

Defined Under Namespace

Classes: PublicKeys

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(client:) ⇒ Mle

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Returns a new instance of Mle.

Parameters:



55
56
57
58
# File 'lib/method_ruby/resources/teams/mle.rb', line 55

def initialize(client:)
  @client = client
  @public_keys = MethodRuby::Resources::Teams::Mle::PublicKeys.new(client: client)
end

Instance Attribute Details

#public_keysMethodRuby::Resources::Teams::Mle::PublicKeys (readonly)

Team and API key management



10
11
12
# File 'lib/method_ruby/resources/teams/mle.rb', line 10

def public_keys
  @public_keys
end

Instance Method Details

#jwks(request_options: {}) ⇒ MethodRuby::Models::Teams::MleJwksResponse

Returns the currently active Method public keys for Message-Level Encryption.

Parameters:

Returns:

See Also:



21
22
23
24
25
26
27
28
29
# File 'lib/method_ruby/resources/teams/mle.rb', line 21

def jwks(params = {})
  @client.request(
    method: :get,
    path: ".well-known/jwks.json",
    model: MethodRuby::Models::Teams::MleJwksResponse,
    security: {},
    options: params[:request_options]
  )
end

#retrieve_method_key(jwk_id, request_options: {}) ⇒ MethodRuby::Models::Teams::MleRetrieveMethodKeyResponse

Returns a single Method public key by identifier for Message-Level Encryption.

Parameters:

  • jwk_id (String)

    Unique identifier for the Method public JWK.

  • request_options (MethodRuby::RequestOptions, Hash{Symbol=>Object}, nil)

Returns:

See Also:



42
43
44
45
46
47
48
49
50
# File 'lib/method_ruby/resources/teams/mle.rb', line 42

def retrieve_method_key(jwk_id, params = {})
  @client.request(
    method: :get,
    path: ["auth/%1$s", jwk_id],
    model: MethodRuby::Models::Teams::MleRetrieveMethodKeyResponse,
    security: {},
    options: params[:request_options]
  )
end