Skip to content

bettyblocks/fusion_jwt_authentication

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status

FusionJwtAuthentication

Library to authenticate jwt token with a plug.

Below can be configured in your app.

claim_options Follow the joker claims though you will probably need to set the iss and aud in a keyword list. iss is the jwt supplier name from the jwt. aud is the application of fusionauth the jwt is used for logging in to.

base_url Should be the url of fusionauth like fusionauth.test.com

config :fusion_jwt_authentication,
  http_client: HTTPoison,
  claim_options: [],
  base_url: ""

Installation

If available in Hex, the package can be installed by adding fusion_jwt_authentication to your list of dependencies in mix.exs:

def deps do
  [
    {:fusion_jwt_authentication, "~> 0.5"}
  ]
end

Can be added to a phoenix router pipeline like below. Cookies should also be fetched because at the moment it fetches jwt from cookies.

pipeline :auth do
  plug :fetch_cookies
  plug FusionJWTAuthentication.FusionJWTAuthPlug
end

Documentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/fusion_jwt_authentication.

Backwards compatibility

In version 0.5 the dependency of phoenix was dropped, and therefore the ErrorView no longer be updated. If you need this stick to version 0.4.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages