All Projects → danschultzer → phoenix_oauth2_provider

danschultzer / phoenix_oauth2_provider

Licence: MIT License
Get an OAuth 2 provider running in your phoenix with controllers, views and models in just two minutes

Programming Languages

elixir
2628 projects
HTML
75241 projects

Projects that are alternatives of or similar to phoenix oauth2 provider

Ex oauth2 provider
Making OAuth 2 provider and authentication with http bearer as simple as possible for Elixir and Phoenix apps
Stars: ✭ 137 (+90.28%)
Mutual labels:  phoenix, oauth2-provider, oauth2-server
Oauth2 Server
spring boot (springboot 2+) oauth2 server sso 单点登录 认证中心 JWT,独立部署,用户管理 客户端管理
Stars: ✭ 363 (+404.17%)
Mutual labels:  oauth2-provider, oauth2-server
Example Oauth2 Server
Example for OAuth 2 Server for Authlib.
Stars: ✭ 499 (+593.06%)
Mutual labels:  oauth2-provider, oauth2-server
Oauth2 Server
OAuth2 Server Library
Stars: ✭ 42 (-41.67%)
Mutual labels:  oauth2-provider, oauth2-server
Oauth2
OAuth 2.0 server library for the Go programming language.
Stars: ✭ 2,173 (+2918.06%)
Mutual labels:  oauth2-provider, oauth2-server
Flask Oauthlib
YOU SHOULD USE https://github.com/lepture/authlib
Stars: ✭ 1,429 (+1884.72%)
Mutual labels:  oauth2-provider, oauth2-server
Doorkeeper
Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
Stars: ✭ 4,917 (+6729.17%)
Mutual labels:  oauth2-provider, oauth2-server
Hydra
OpenID Certified™ OpenID Connect and OAuth Provider written in Go - cloud native, security-first, open source API security for your infrastructure. SDKs for any language. Compatible with MITREid.
Stars: ✭ 11,884 (+16405.56%)
Mutual labels:  oauth2-provider, oauth2-server
Doorkeeper Provider App
An example OAuth 2 provider application using the Doorkeeper gem, Rails and Devise
Stars: ✭ 146 (+102.78%)
Mutual labels:  oauth2-provider, oauth2-server
Authlib
The ultimate Python library in building OAuth, OpenID Connect clients and servers. JWS,JWE,JWK,JWA,JWT included.
Stars: ✭ 2,854 (+3863.89%)
Mutual labels:  oauth2-provider, oauth2-server
Light Oauth2
A fast, light and cloud native OAuth 2.0 authorization microservices based on light-4j
Stars: ✭ 247 (+243.06%)
Mutual labels:  oauth2-provider, oauth2-server
mindwendel
Create a challenge. Ready? Brainstorm. mindwendel helps you to easily brainstorm and upvote ideas and thoughts within your team.
Stars: ✭ 22 (-69.44%)
Mutual labels:  phoenix
jpsite-security-oauth2-open
微服务开放API授权平台
Stars: ✭ 21 (-70.83%)
Mutual labels:  oauth2-server
blog app
Phoenix 1.3 GraphQL
Stars: ✭ 19 (-73.61%)
Mutual labels:  phoenix
elixir jobs
A job board to publish and find Elixir offers.
Stars: ✭ 83 (+15.28%)
Mutual labels:  phoenix
easy podcasts
Agregador de podcasts y convertidor de audio para cubanos
Stars: ✭ 28 (-61.11%)
Mutual labels:  phoenix
indicado
Technical indicator library for Elixir with no dependencies.
Stars: ✭ 15 (-79.17%)
Mutual labels:  phoenix
gleam compile
Tiny hex package to make the development experience of using gleam in elixir (and especially phoenix projects) better.
Stars: ✭ 29 (-59.72%)
Mutual labels:  phoenix
reason-phoenix
ReasonML/ReScript bindings for the Phoenix javascript library
Stars: ✭ 14 (-80.56%)
Mutual labels:  phoenix
phoenix-elm-template
A starter repo with Phoenix, Elm 0.19, and Parcel
Stars: ✭ 16 (-77.78%)
Mutual labels:  phoenix

PhoenixOauth2Provider

Build Status hex.pm hex.pm downloads

Get an OAuth 2.0 provider running in your Phoenix app with schema modules and templates in just two minutes.

Installation

Add PhoenixOauth2Provider to your list of dependencies in mix.exs:

def deps do
  [
    # ...
    {:phoenix_oauth2_provider, "~> 0.5.1"}
    # ...
  ]
end

Run mix deps.get to install it.

Getting started

Install ExOauthProvider first:

mix ex_oauth2_provider.install

Follow the instructions to update config/config.exs.

Set up routes:

defmodule MyAppWeb.Router do
  use MyAppWeb, :router
  use PhoenixOauth2Provider.Router, otp_app: :my_app

  # ...

  pipeline :protected do
    # Require user authentication
  end

  scope "/" do
    pipe_through :api

    oauth_api_routes()
  end

  scope "/" do
    pipe_through [:browser, :protected]

    oauth_routes()
  end

  # ...
end

That's it! The following OAuth 2.0 routes will now be available in your app:

oauth_authorize_path  GET    /oauth/authorize         AuthorizationController :new
oauth_authorize_path  POST   /oauth/authorize         AuthorizationController :create
oauth_authorize_path  GET    /oauth/authorize/:code   AuthorizationController :show
oauth_authorize_path  DELETE /oauth/authorize         AuthorizationController :delete
oauth_token_path      POST   /oauth/token             TokenController :create
oauth_token_path      POST   /oauth/revoke            TokenController :revoke

Please read the ExOauth2Provider documentation for further customization.

Configuration

Templates

To generate views and templates run:

mix phoenix_oauth2_provider.gen.templates

Set up the PhoenixOauth2Provider configuration with :web_module:

config :my_app, PhoenixOauth2Provider,
  web_module: MyAppWeb

Current resource owner

Set up what key in the plug conn assigns that PhoenixOauth2Provider should use to fetch the current resource owner.

config :my_app, PhoenixOauth2Provider,
  current_resource_owner: :current_user

LICENSE

(The MIT License)

Copyright (c) 2017-2019 Dan Schultzer & the Contributors

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].