Class: AWSCDK::BedrockAgentCore::CognitoAuthorizerProps
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::BedrockAgentCore::CognitoAuthorizerProps
- Defined in:
- bedrock_agent_core/cognito_authorizer_props.rb
Overview
**************************************************************************** Factory ***************************************************************************.
Instance Attribute Summary collapse
-
#allowed_audiences ⇒ Array<String>?
readonly
The allowed audiences for JWT validation.
-
#allowed_clients ⇒ Array<AWSCDK::Cognito::IUserPoolClient>?
readonly
The allowed User Pool clients.
-
#allowed_scopes ⇒ Array<String>?
readonly
The allowed scopes for JWT validation.
-
#custom_claims ⇒ Array<AWSCDK::BedrockAgentCore::GatewayCustomClaim>?
readonly
Custom claims for additional JWT token validation.
-
#user_pool ⇒ AWSCDK::Cognito::IUserPool
readonly
The Cognito User Pool to use for authentication.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(user_pool:, allowed_audiences: nil, allowed_clients: nil, allowed_scopes: nil, custom_claims: nil) ⇒ CognitoAuthorizerProps
constructor
A new instance of CognitoAuthorizerProps.
- #to_jsii ⇒ Object
Constructor Details
#initialize(user_pool:, allowed_audiences: nil, allowed_clients: nil, allowed_scopes: nil, custom_claims: nil) ⇒ CognitoAuthorizerProps
Returns a new instance of CognitoAuthorizerProps.
12 13 14 15 16 17 18 19 20 21 22 23 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 12 def initialize(user_pool:, allowed_audiences: nil, allowed_clients: nil, allowed_scopes: nil, custom_claims: nil) @user_pool = user_pool Jsii::Type.check_type(@user_pool, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY29nbml0by5JVXNlclBvb2wifQ==")), "userPool") @allowed_audiences = allowed_audiences Jsii::Type.check_type(@allowed_audiences, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedAudiences") unless @allowed_audiences.nil? @allowed_clients = allowed_clients Jsii::Type.check_type(@allowed_clients, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19jb2duaXRvLklVc2VyUG9vbENsaWVudCJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedClients") unless @allowed_clients.nil? @allowed_scopes = allowed_scopes Jsii::Type.check_type(@allowed_scopes, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7InByaW1pdGl2ZSI6InN0cmluZyJ9LCJraW5kIjoiYXJyYXkifX0=")), "allowedScopes") unless @allowed_scopes.nil? @custom_claims = custom_claims Jsii::Type.check_type(@custom_claims, JSON.parse(Base64.strict_decode64("eyJjb2xsZWN0aW9uIjp7ImVsZW1lbnR0eXBlIjp7ImZxbiI6ImF3cy1jZGstbGliLmF3c19iZWRyb2NrYWdlbnRjb3JlLkdhdGV3YXlDdXN0b21DbGFpbSJ9LCJraW5kIjoiYXJyYXkifX0=")), "customClaims") unless @custom_claims.nil? end |
Instance Attribute Details
#allowed_audiences ⇒ Array<String>? (readonly)
Default: - No audience validation
The allowed audiences for JWT validation.
33 34 35 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 33 def allowed_audiences @allowed_audiences end |
#allowed_clients ⇒ Array<AWSCDK::Cognito::IUserPoolClient>? (readonly)
Default: - All clients are allowed
The allowed User Pool clients.
38 39 40 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 38 def allowed_clients @allowed_clients end |
#allowed_scopes ⇒ Array<String>? (readonly)
Default: - No scope validation
The allowed scopes for JWT validation.
43 44 45 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 43 def allowed_scopes @allowed_scopes end |
#custom_claims ⇒ Array<AWSCDK::BedrockAgentCore::GatewayCustomClaim>? (readonly)
Default: - No custom claim validation
Custom claims for additional JWT token validation.
Allows you to validate additional fields in JWT tokens beyond the standard audience, client, and scope validations.
50 51 52 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 50 def custom_claims @custom_claims end |
#user_pool ⇒ AWSCDK::Cognito::IUserPool (readonly)
The Cognito User Pool to use for authentication.
28 29 30 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 28 def user_pool @user_pool end |
Class Method Details
.jsii_properties ⇒ Object
52 53 54 55 56 57 58 59 60 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 52 def self.jsii_properties { :user_pool => "userPool", :allowed_audiences => "allowedAudiences", :allowed_clients => "allowedClients", :allowed_scopes => "allowedScopes", :custom_claims => "customClaims", } end |
Instance Method Details
#to_jsii ⇒ Object
62 63 64 65 66 67 68 69 70 71 72 |
# File 'bedrock_agent_core/cognito_authorizer_props.rb', line 62 def to_jsii result = {} result.merge!({ "userPool" => @user_pool, "allowedAudiences" => @allowed_audiences, "allowedClients" => @allowed_clients, "allowedScopes" => @allowed_scopes, "customClaims" => @custom_claims, }) result.compact end |