Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate how we could handle authentication of the graphiql endpoint #32

Open
josephwoodward opened this issue Aug 15, 2019 · 4 comments

Comments

@josephwoodward
Copy link
Owner

See here for more discussions on this.

@MisterJimson
Copy link

I suggest a small bit of UI that allows you to set a map of header values and keys. This should be suitable for most authentication setups.

@aleGuardiola
Copy link

services.AddSwaggerGen(options =>
{
options.SwaggerDoc("v1", new Info {Title = "Protected API", Version = "v1"});

// we're going to be adding more here...

});

options.AddSecurityDefinition("oauth2", new OAuth2Scheme
{
Flow = "implicit",
AuthorizationUrl = "http://localhost:5000/connect/authorize",
Scopes = new Dictionary<string, string> {
{ "demo_api", "Demo API - full access" }
}
});

This is how swagger doc handle authentication. It will be nice something like that where is possible to create custom scheme.

@josephwoodward
Copy link
Owner Author

How about making it more general purpose by a delegate that gets invoked before GraphQL that enables you to validate the request (whether by oauth or basic auth, or any other means) that returns a boolean for whether to enable the GraphQL endpoint?

@josephwoodward
Copy link
Owner Author

This is what I'm thinking, thoughts are appreciated #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants