3using System.Threading.Tasks;
6using HotChocolate.Authorization;
7using HotChocolate.Types;
19 [GraphQLDescription(GraphQLDescription)]
35 public ValueTask<LoginResult>
Login(
37 CancellationToken cancellationToken)
39 ArgumentNullException.ThrowIfNull(loginAuthority);
42 authority => authority.AttemptLogin(cancellationToken));
55 CancellationToken cancellationToken)
57 ArgumentNullException.ThrowIfNull(loginAuthority);
60 authority => authority.AttemptOAuthGatewayLogin(cancellationToken));
Exception representing ErrorMessageResponses.
Root type for GraphQL mutations.
const string GraphQLDescription
Description to show on the Mutation type.
ValueTask< OAuthGatewayLoginResult > OAuthGateway([Service] IGraphQLAuthorityInvoker< ILoginAuthority > loginAuthority, CancellationToken cancellationToken)
Generate an OAuth user token for the requested service. This requires the OAuth authentication scheme...
ValueTask< LoginResult > Login([Service] IGraphQLAuthorityInvoker< ILoginAuthority > loginAuthority, CancellationToken cancellationToken)
Generate a JWT for authenticating with server. This requires either the Basic authentication or OAuth...
Success response for a login attempt.
Success result for an OAuth gateway login attempt.
Invokes TAuthority s from GraphQL endpoints.