TT-11298 added possibilit to fill the state by url or form encoded body #389 #427
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Duplicated of #389 with latest master changes.
Description
In the current implementation of tib the state used is always the value
state
this is contradicting the RFC 6749Related Issue
#388
Tyk Support Request #18436
Tyk Feature Issue: TT-11298
Motivation and Context
It enables the application that wants to log in via tib to send its own state what makes it opaque and non guessable.
But in the implementation I kept the hardcoded
state
as a fallback to keep it backwards compatible.How This Has Been Tested
I tested this in our tyk on prem production environment with a oauth provider that required a minimum length of the state value. Also I added tests to the tothic_test.go file.
Types of changes
Checklist
fork, don't request your
master
!master
branch (left side). Also, you should startyour branch off our latest
master
.go mod tidy && go mod vendor
go fmt -s
go vet