Git Product home page Git Product logo

Comments (6)

xanscale avatar xanscale commented on June 26, 2024

i can make a pull requests, if you consider is usefull

from ixortalk.aws.cognito.jwt.security.filter.

ddewaele avatar ddewaele commented on June 26, 2024

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.

xanscale avatar xanscale commented on June 26, 2024

"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.

ddewaele avatar ddewaele commented on June 26, 2024

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.

xanscale avatar xanscale commented on June 26, 2024

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.

xanscale avatar xanscale commented on June 26, 2024

go further on other thread

from ixortalk.aws.cognito.jwt.security.filter.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.