graphql-dotnet / Authorization
Licence: mit
A toolset for authorizing access to graph types for GraphQL .NET.
Stars: ✭ 127
Labels
Projects that are alternatives of or similar to Authorization
Express Graphql Mongodb Boilerplate
A boilerplate for Node.js apps / GraphQL-API / Authentication from scratch - express, graphql - (graphql compose), mongodb (mongoose).
Stars: ✭ 288 (+126.77%)
Mutual labels: graphql, authorization
Graphql Pundit
Pundit authorization helpers for the GraphQL Ruby gem
Stars: ✭ 109 (-14.17%)
Mutual labels: graphql, authorization
Graphql Guard
Simple authorization gem for GraphQL 🔒
Stars: ✭ 434 (+241.73%)
Mutual labels: graphql, authorization
Action policy Graphql
Action Policy integration for GraphQL
Stars: ✭ 110 (-13.39%)
Mutual labels: graphql, authorization
Got Auth Service
A professional role-based-authorization(also supports resource and group) service with restful and graphql api for enterprise applications.
Stars: ✭ 12 (-90.55%)
Mutual labels: graphql, authorization
Graphql Directive Auth
GraphQL directive for handling auth
Stars: ✭ 120 (-5.51%)
Mutual labels: graphql, authorization
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 (+9257.48%)
Mutual labels: authorization
Go Proto Gql
Protobuff plugins for generating graphql schema and golang to graphql bindings. Also supports a graphql gateway (Alpha)
Stars: ✭ 127 (+0%)
Mutual labels: graphql
Dataloader
DataLoader is a generic utility to be used as part of your application's data fetching layer to provide a consistent API over various backends and reduce requests to those backends via batching and caching.
Stars: ✭ 11,040 (+8592.91%)
Mutual labels: graphql
Apollo2 Subscriptions How To
Apollo Server 2 how to setup subscriptions
Stars: ✭ 125 (-1.57%)
Mutual labels: graphql
Laravel Auth
A powerful authentication, authorization and verification package built on top of Laravel. It provides developers with Role Based Access Control, Two-Factor Authentication, Social Authentication, and much more, compatible Laravel’s standard API and fully featured out of the box.
Stars: ✭ 128 (+0.79%)
Mutual labels: authorization
Giraffeql
🦒 Developer tool to visualize relational databases and export schemas for GraphQL API's.
Stars: ✭ 128 (+0.79%)
Mutual labels: graphql
Ts Transform Graphql Tag
Compiles GraphQL tagged template strings using graphql-tag in TypeScript files.
Stars: ✭ 127 (+0%)
Mutual labels: graphql
Directus
Open-Source Data Platform 🐰 — Directus wraps any SQL database with a real-time GraphQL+REST API and an intuitive app for non-technical users.
Stars: ✭ 13,190 (+10285.83%)
Mutual labels: graphql
Graphqlcore
Learn how to implement scalable APIs with GraphQL and ASP.NET Core. Branch wise code with relevant topic for smooth and easy walkthrough.
Stars: ✭ 125 (-1.57%)
Mutual labels: graphql
Awesome Apollo Graphql
A curated list of amazingly awesome things regarding Apollo GraphQL ecosystem 🌟
Stars: ✭ 126 (-0.79%)
Mutual labels: graphql
Apollo Universal Starter Kit
Apollo Universal Starter Kit is an SEO-friendly, fully-configured, modular starter application that helps developers to streamline web, server, and mobile development with cutting-edge technologies and ultimate code reuse.
Stars: ✭ 1,645 (+1195.28%)
Mutual labels: graphql
GraphQL Authorization
A toolset for authorizing access to graph types for GraphQL.NET.
Usage
- Register the authorization classes in your DI container (
IAuthorizationEvaluator
,AuthorizationSettings
, and theAuthorizationValidationRule
). - Provide a
UserContext
class that implementsIProvideClaimsPrincipal
. - Add policies to the
AuthorizationSettings
. - Apply a policy to a GraphType or Field (which implement
IProvideMetadata
) usingAuthorizeWith(string policy)
. - Make sure the
AuthorizationValidationRule
is registered with your Schema (depending on your server implementation, you may only need to register it in your DI container) - The
AuthorizationValidationRule
will run and verify the policies based on the registered policies. - You can write your own
IAuthorizationRequirement
. - Use
GraphQLAuthorize
attribute if using Schema First syntax.
Examples
-
Fully functional basic sample.
-
GraphType first syntax - use
AuthorizeWith
.
public class MyType : ObjectGraphType
{
public MyType()
{
this.AuthorizeWith("AdminPolicy");
Field<StringGraphType>("name").AuthorizeWith("SomePolicy");
}
}
- Schema first syntax - use
GraphQLAuthorize
attribute.
[GraphQLAuthorize(Policy = "MyPolicy")]
public class MutationType
{
[GraphQLAuthorize(Policy = "AnotherPolicy")]
public async Task<string> CreateSomething(MyInput input)
{
return Guid.NewGuid().ToString();
}
}
Known Issues
- It is currently not possible to add a policy to Input objects using Schema first approach.
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].