Git Product home page Git Product logo

invio.extensions.authentication.jwtbearer's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

invio.extensions.authentication.jwtbearer's Issues

Add immutable `JwtBearerQueryStringBehaviorOptions` concept

Background

Right now I have one "Options" class, the JwtBearerQueryStringOptions. This is great for configuring the extension, but when it is provided to the behavior, it gives a little bit too much power.

Specifically, it lets the behavior see its own specification on the options object, which is something that should be abstracted away. It also is mutable, so the behavior can adjust the configuration while it is running. Neither of these should be allowed.

Task

Make a new JwtBearerQueryStringBehaviorOptions class that is (1) immutable, and (2) provides a subset of settings from JwtBearerQueryStringOptions that are appropriate for a IJwtBearerQueryStringBehavior to know about. It should get hydrated within the JwtBearerQueryStringMiddleware here

Add `RemoveJwtBearerQueryStringBehavior` implementation

Background

As an alternative to "redacting" tokens from query strings, we can also remove them entirely. This will hide from the logs that a token was included at all, which may be more helpful than saying that it was included but we are redacting it from view.

Task

  • Add a RemoveJwtBearerQueryStringBehavior implementation of IJwtBearerQueryStringBehavior that removes the token from the query string if it is found.
  • Update QueryStringBehaviors to have a new immutable Remove property that returns this behavior.

HTTP call is rejected before the URI token is examined

I'm trying to use your library.
I think I followed the instructions properly.

My problem is that my HTTP GET seems to be rejected by the authentication mechanism before the token on the URL gets processed.

I took option 2 from your SO answer to confirm that the OnMessageReceived code is never called.

Does that behavior rings a bell on what could be wrong ?

Add `MoveToHeaderJwtBearerQueryStringBehavior` implementation

Background

As an alternative to "redacting" tokens from query strings, we can also move tokens to the Authorization HTTP header. This enables code downstream to assume the token is always present in the authorization header.

An interesting use case this enables is putting the middleware in front of any authentication code rather than mutating the authentication code to allow for query strings.

Task

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.