simonh1000 / elm-jwt

Json Web Token (JWT) helper functions for Elm
http://package.elm-lang.org/packages/simonh1000/elm-jwt/latest
MIT License
94 stars 12 forks source link

Discussion: provide functions for split JWT token headers #28

Open kutyel opened 5 months ago

kutyel commented 5 months ago

Hi! Recently a colleague split the bearer token because of some security reasons, thus I ended up having to do this in all my HTTP calls:

                , headers =
                    [ Http.header "x-signature-token" tokens.signatureToken
                    , Http.header "x-header-payload-token" tokens.headerPayloadToken
                    ]

Does it make sense to add Http.{get|delete|put|post} function libs to support that use case to this library? 🤔

simonh1000 commented 5 months ago

To be honest if I changed anything it would probably be the remove the http stuff all together - chances are there are other headers you want to add anyway - e.g. Content-Type - so I suspect these functions are essentially unused, and rather break the notion of 'do just 1 thing well'