Class: AWSCDK::Cognito::CfnUserPoolClient::RefreshTokenRotationProperty

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cognito/cfn_user_pool_client.rb

Overview

The configuration of your app client for refresh token rotation.

When enabled, your app client issues new ID, access, and refresh tokens when users renew their sessions with refresh tokens. When disabled, token refresh issues only ID and access tokens.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(feature: nil, retry_grace_period_seconds: nil) ⇒ RefreshTokenRotationProperty

Returns a new instance of RefreshTokenRotationProperty.

Parameters:

  • feature (String, nil) (defaults to: nil)

    The state of refresh token rotation for the current app client.

  • retry_grace_period_seconds (Numeric, nil) (defaults to: nil)

    When you request a token refresh with GetTokensFromRefreshToken , the original refresh token that you're rotating out can remain valid for a period of time of up to 60 seconds.



885
886
887
888
889
890
# File 'cognito/cfn_user_pool_client.rb', line 885

def initialize(feature: nil, retry_grace_period_seconds: nil)
  @feature = feature
  Jsii::Type.check_type(@feature, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "feature") unless @feature.nil?
  @retry_grace_period_seconds = retry_grace_period_seconds
  Jsii::Type.check_type(@retry_grace_period_seconds, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJudW1iZXIifQ==")), "retryGracePeriodSeconds") unless @retry_grace_period_seconds.nil?
end

Instance Attribute Details

#featureString? (readonly)

The state of refresh token rotation for the current app client.



896
897
898
# File 'cognito/cfn_user_pool_client.rb', line 896

def feature
  @feature
end

#retry_grace_period_secondsNumeric? (readonly)

When you request a token refresh with GetTokensFromRefreshToken , the original refresh token that you're rotating out can remain valid for a period of time of up to 60 seconds.

This allows for client-side retries. When RetryGracePeriodSeconds is 0 , the grace period is disabled and a successful request immediately invalidates the submitted refresh token.



903
904
905
# File 'cognito/cfn_user_pool_client.rb', line 903

def retry_grace_period_seconds
  @retry_grace_period_seconds
end

Class Method Details

.jsii_propertiesObject



905
906
907
908
909
910
# File 'cognito/cfn_user_pool_client.rb', line 905

def self.jsii_properties
  {
    :feature => "feature",
    :retry_grace_period_seconds => "retryGracePeriodSeconds",
  }
end

Instance Method Details

#to_jsiiObject



912
913
914
915
916
917
918
919
# File 'cognito/cfn_user_pool_client.rb', line 912

def to_jsii
  result = {}
  result.merge!({
    "feature" => @feature,
    "retryGracePeriodSeconds" => @retry_grace_period_seconds,
  })
  result.compact
end