Skip to content

Commit

Permalink
resetme
Browse files Browse the repository at this point in the history
  • Loading branch information
amancevice committed Nov 26, 2023
1 parent ff7869f commit a62f9bf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 7 deletions.
1 change: 1 addition & 0 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -727,6 +727,7 @@ resource "aws_sfn_state_machine" "states" {
scope_parameter = var.parameters.scope == null ? "" : var.parameters.scope
signing_secret_parameter = var.parameters.signing_secret == null ? "" : var.parameters.signing_secret
state_parameter = var.parameters.state == null ? "" : var.parameters.state
success_uri_parameter = var.parameters.success_uri == null ? "" : var.parameters.success_uri
user_scope_parameter = var.parameters.user_scope == null ? "" : var.parameters.user_scope
})))

Expand Down
8 changes: 4 additions & 4 deletions state-machines/default.asl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ StartAt: AuthorizeAndTransform
States:
AuthorizeAndTransform:
Type: Parallel
Next: PublishAndRespond
Next: PublishEventAndRespond
OutputPath: $[1]
Branches:
- StartAt: Authorize
Expand All @@ -19,14 +19,14 @@ States:
Type: Task
Resource: ${http_transformer_function_arn}
End: true
PublishAndRespond:
PublishEventAndRespond:
Type: Parallel
End: true
OutputPath: $[1]
Branches:
- StartAt: Publish
- StartAt: PublishEvent
States:
Publish:
PublishEvent:
Type: Task
Resource: arn:aws:states:::aws-sdk:eventbridge:putEvents
End: true
Expand Down
30 changes: 27 additions & 3 deletions state-machines/oauth.asl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,38 @@ States:
CompleteOAuth:
Type: Task
Resource: ${oauth_function_arn}
Next: Redirect
Next: PublishEvent
Parameters:
code.$: $.code
redirect_uri: ${redirect_uri}
Redirect:
Type: Pass
PublishEvent:
Type: Task
Resource: arn:aws:states:::aws-sdk:eventbridge:putEvents
Next: GetSuccessUri
Parameters:
Entries:
- EventBusName: ${event_bus_name}
Source: ${domain_name}
DetailType: ${detail_type}
Detail.$: $
GetSuccessUri:
Type: Task
Resource: arn:aws:states:::aws-sdk:ssm:getParameter
End: true
ResultSelector:
statusCode: 302
headers:
location.$: $.Parameter.Value
Parameters:
Name: ${success_uri_parameter}
Catch:
- Next: DefaultSuccessUri
ErrorEquals:
- States.ALL
DefaultSuccessUri:
Type: Pass
End: true
Result:
statusCode: 302
headers:
location: slack://open

0 comments on commit a62f9bf

Please sign in to comment.