Comments (6)
i can make a pull requests, if you consider is usefull
from ixortalk.aws.cognito.jwt.security.filter.
Can you describe you use-case with the library ? Do you want to have some kind of fallback mechanism in place when the Jwt Authentication fails (and use another authenication mechanism ?)
I think it's a common practice to clear the security context upon an exception in a security filter (ex: BasicAuthenticationFilter does exactly the same, catching the exception and clearing the securitycontext.
But happy to hear about your use case and seeing how we can facilitate it.
from ixortalk.aws.cognito.jwt.security.filter.
"and use another authenication mechanism?" simply YES
we need to use AWS Cognito and a custom sso
i hava another filter that create your JwtAuthentication in same format but using different logic
with this works perfectly
https://github.com/xanscale/ixortalk.aws.cognito.jwt.security.filter/commit/9d74796ba6974de7859cdf3cf87bd9c004089828
instead of clear security context i used
.sessionManagement().sessionCreationPolicy(SessionCreationPolicy.STATELESS)
from ixortalk.aws.cognito.jwt.security.filter.
Is your filter made part of the spring security filter chain ? If so you can run it after the AwsCognitoJwtAuthenticationFilter. The AwsCognitoJwtAuthenticationFilter will clear the security context but your filter can then fill it up.
Would that be an option ?
I did log issue #13 just now to point out that spring can register the filter twice when not providing a custom FilterRegistrationBean to exclude it.
from ixortalk.aws.cognito.jwt.security.filter.
i will try your #13 suggestion, but in this way how set order? can you show me code for registering 2 filter in specific order?
from ixortalk.aws.cognito.jwt.security.filter.
go further on other thread
from ixortalk.aws.cognito.jwt.security.filter.
Related Issues (18)
- The code doesnt have AwsCognitoJwtVerifier class, does this work ? HOT 4
- Documentation Issue HOT 1
- AwsCognitoJwtAuthenticationFilter bean is registered twice when placed in Spring Security Filter Chain HOT 9
- Spring boot 2 support HOT 10
- BeanCreationException HOT 1
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.awsCognitoCredentialsHolder' HOT 1
- Group is required or a null pointer exception occurs. HOT 2
- Unable to generate private_key.json for jwks.json from cognito HOT 1
- Make header configurable
- identityPoolId does not appear to be used
- When add invalid token and then add a valid token on first request it throws 500 internal server error. with exception com.nimbusds.jose.proc.BadJWSException: Signed JWT rejected: Invalid signature
- Valid token getting NullPointerException HOT 2
- Usage of ID token HOT 1
- Verifying the JWT token signature HOT 2
- Duplicate HOT 2
- JSON parsing failing HOT 2
- client_credentials flow not supported HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ixortalk.aws.cognito.jwt.security.filter.