Giter Club home page Giter Club logo

Comments (1)

lopezvit avatar lopezvit commented on June 9, 2024

Hello, I'm going to close this issue, as I found a workaround that would combine this library with charmander without needing to change any library. Here there is the code that I used. The trick was to change the backend, from Signed JWT backends/jwsto backends/token. That way, the backend doesn't try to verify the signature itself, but gives the opportunity to add a function to the the authentication:

(defn my-authfn
  [request token]
  (log/trace
   (second
    (re-find (re-pattern (str "^" "Token" " (.+)$"))
             (http/-get-header request "authorization"))))
  (log/trace (:uid (charm/validate-token "<YOUR-PROJECT-HERE>" token)))
  (:uid (charm/validate-token "<YOUR-PROJECT-HERE>" token)))

(def backend
  (backends/token
   {:authfn my-authfn}))

In case it could help anybody, do not use https://github.com/magnetcoop/buddy-auth.jwt-oidc library: It might seem that it works, as it allows you to add a URI where to download a JWKS file but firebase's https://www.googleapis.com/robot/v1/metadata/x509/[email protected] file is not in that format. It took me a lot of time and debug to find out why it wasn't working, but at least it gave me the clue on how to get to this workaround that is actually working.

from buddy-auth.

Related Issues (20)

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.