All Projects → finagle → Finagle Oauth2

finagle / Finagle Oauth2

Licence: apache-2.0
OAuth2 Server-Side Provider for Finagle

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to Finagle Oauth2

Weixin
[READ ONLY] Subtree split of the SocialiteProviders/Weixin Provider (see SocialiteProviders/Providers)
Stars: ✭ 84 (+0%)
Mutual labels:  oauth2, oauth
Ueberauth twitter
Twitter Strategy for Überauth
Stars: ✭ 31 (-63.1%)
Mutual labels:  oauth2, oauth
Pizzly
The simplest, fastest way to integrate your app with an OAuth API 😋
Stars: ✭ 796 (+847.62%)
Mutual labels:  oauth2, oauth
Mod auth openidc
OpenID Connect Relying Party implementation for Apache HTTP Server 2.x
Stars: ✭ 677 (+705.95%)
Mutual labels:  oauth2, oauth
Netcore Postgres Oauth Boiler
A basic .NET Core website boilerplate using PostgreSQL for storage, Adminer for db management, Let's Encrypt for SSL certificates and NGINX for routing.
Stars: ✭ 57 (-32.14%)
Mutual labels:  oauth2, oauth
Fw Cloud Framework
基于springcloud全家桶开发分布式框架(支持oauth2认证授权、SSO登录、统一下单、微信公众号服务、Shardingdbc分库分表、常见服务监控、链路监控、异步日志、redis缓存等功能),实现基于Vue全家桶等前后端分离项目工程
Stars: ✭ 717 (+753.57%)
Mutual labels:  oauth2, oauth
Web Framework For Java
A seed project with spring boot for AngularJS, AngularJs Material, Thymeleaf, RESTful API, MySQL and admin panel based on AdminLTE.
Stars: ✭ 29 (-65.48%)
Mutual labels:  oauth2, oauth
React Native Inappbrowser
📱InAppBrowser for React Native (Android & iOS) 🤘
Stars: ✭ 624 (+642.86%)
Mutual labels:  oauth2, oauth
Visa
Easy third party authentication (OAuth 2.0) for Flutter apps.
Stars: ✭ 50 (-40.48%)
Mutual labels:  oauth2, oauth
Qq
[READ ONLY] Subtree split of the SocialiteProviders/QQ Provider (see SocialiteProviders/Providers)
Stars: ✭ 50 (-40.48%)
Mutual labels:  oauth2, oauth
Ueberauth github
GitHub OAuth2 Strategy for Überauth
Stars: ✭ 80 (-4.76%)
Mutual labels:  oauth2, oauth
Node Oauth2 Server Mongo Example
Working oauth2 server with mongodb storage and minimal configuration
Stars: ✭ 76 (-9.52%)
Mutual labels:  oauth2, oauth
Rack Oauth2
OAuth 2.0 Server & Client Library. Both Bearer and MAC token type are supported.
Stars: ✭ 652 (+676.19%)
Mutual labels:  oauth2, oauth
Cpprestsdk
The C++ REST SDK is a Microsoft project for cloud-based client-server communication in native code using a modern asynchronous C++ API design. This project aims to help C++ developers connect to and interact with services.
Stars: ✭ 6,631 (+7794.05%)
Mutual labels:  oauth2, oauth
Next Auth
Authentication for Next.js
Stars: ✭ 8,362 (+9854.76%)
Mutual labels:  oauth2, oauth
Play Silhouette
Silhouette is an authentication library for Play Framework applications that supports several authentication methods, including OAuth1, OAuth2, OpenID, CAS, 2FA, TOTP, Credentials, Basic Authentication or custom authentication schemes.
Stars: ✭ 826 (+883.33%)
Mutual labels:  oauth2, oauth
Doorkeeper
Doorkeeper is an OAuth 2 provider for Ruby on Rails / Grape.
Stars: ✭ 4,917 (+5753.57%)
Mutual labels:  oauth2, oauth
Scribejava
Simple OAuth library for Java
Stars: ✭ 5,223 (+6117.86%)
Mutual labels:  oauth2, oauth
Socialite
Socialite is an OAuth2 Authentication tool. It is inspired by laravel/socialite, you can easily use it without Laravel.
Stars: ✭ 1,026 (+1121.43%)
Mutual labels:  oauth2, oauth
Mailchimp Api 3.0 Php
A feature rich object-oriented PHP library for interacting with MailChimp's API v3 💌🐵
Stars: ✭ 61 (-27.38%)
Mutual labels:  oauth2, oauth

Build Status Maven Central

OAuth2 Provider for Finagle

This is a Finagle-friendly version of scala-oauth2-provider.

User Guide

  1. Implement com.twitter.finagle.oauth2.DataHandler using your own data store (in-memory, DB, etc).
  2. Use com.twitter.finagle.OAuth2 API to authorize requests and issue access tokens.

A service that emits OAuth2 access tokens based on request's credentials.

import com.twitter.finagle.OAuth2
import com.twitter.finagle.oauth2.{OAuthError, DataHandler}

import com.twitter.finagle.http.{Request, Response, Version, Status}
import com.twitter.finagle.Service
import com.twitter.util.Future

val dataHandler: DataHandler[?] = ???

object TokenService extends Service[Request, Response] with OAuth2 {
  def apply(req: Request): Future[Response] =
    issueAccessToken(req, dataHandler).flatMap { token =>
      val rep = Response(Version.Http11, Status.Ok)
      rep.setContentString(token.accessToken)
      Future.value(rep)
    } handle {
      case e: OAuthError => e.toResponse
    }
}

A service that checks whether the request contains a valid token.

import com.twitter.finagle.OAuth2
import com.twitter.finagle.oauth2.{OAuthError, DataHandler}

import com.twitter.finagle.http.{Request, Response, Version, Status}
import com.twitter.finagle.Service
import com.twitter.util.Future

object ProtectedService extends Service[Request, Response] with OAuth2 {
  def apply(req: Request): Future[Response] =
    authorize(req, dataHandler).flatMap { authInfo =>
      val rep = Response(Version.Http11, Status.Ok)
      rep.setContentString(s"Hello ${authInfo.user}!")
      Future.value(rep)
    } handle {
      case e: OAuthError => e.toResponse
    }
}
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].