Class: AWSCDK::BedrockAgentCore::OAuth2AuthorizationServerMetadata

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
bedrock_agent_core/o_auth2_authorization_server_metadata.rb

Overview

Static OAuth2 authorization server metadata for custom credential providers.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(authorization_endpoint:, issuer:, token_endpoint:, response_types: nil) ⇒ OAuth2AuthorizationServerMetadata

Returns a new instance of OAuth2AuthorizationServerMetadata.

Parameters:

  • authorization_endpoint (String)

    The authorization endpoint URL.

  • issuer (String)

    The issuer URL for the OAuth2 authorization server.

  • token_endpoint (String)

    The token endpoint URL.

  • response_types (Array<String>, nil) (defaults to: nil)

    The supported response types.



13
14
15
16
17
18
19
20
21
22
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 13

def initialize(authorization_endpoint:, issuer:, token_endpoint:, response_types: nil)
  @authorization_endpoint = authorization_endpoint
  Jsii::Type.check_type(@authorization_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "authorizationEndpoint")
  @issuer = issuer
  Jsii::Type.check_type(@issuer, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "issuer")
  @token_endpoint = token_endpoint
  Jsii::Type.check_type(@token_endpoint, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "tokenEndpoint")
  @response_types = response_types
  Jsii::Type.check_type(@response_types, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "responseTypes") unless @response_types.nil?
end

Instance Attribute Details

#authorization_endpointString (readonly)

The authorization endpoint URL.

Returns:

  • (String)


27
28
29
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 27

def authorization_endpoint
  @authorization_endpoint
end

#issuerString (readonly)

The issuer URL for the OAuth2 authorization server.

Returns:

  • (String)


31
32
33
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 31

def issuer
  @issuer
end

#response_typesArray<String>? (readonly)

Note:

Default: - not specified

The supported response types.

Returns:

  • (Array<String>, nil)


40
41
42
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 40

def response_types
  @response_types
end

#token_endpointString (readonly)

The token endpoint URL.

Returns:

  • (String)


35
36
37
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 35

def token_endpoint
  @token_endpoint
end

Class Method Details

.jsii_propertiesObject



42
43
44
45
46
47
48
49
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 42

def self.jsii_properties
  {
    :authorization_endpoint => "authorizationEndpoint",
    :issuer => "issuer",
    :token_endpoint => "tokenEndpoint",
    :response_types => "responseTypes",
  }
end

Instance Method Details

#to_jsiiObject



51
52
53
54
55
56
57
58
59
60
# File 'bedrock_agent_core/o_auth2_authorization_server_metadata.rb', line 51

def to_jsii
  result = {}
  result.merge!({
    "authorizationEndpoint" => @authorization_endpoint,
    "issuer" => @issuer,
    "tokenEndpoint" => @token_endpoint,
    "responseTypes" => @response_types,
  })
  result.compact
end