class Mutation(ObjectType): create_user = CreateUser.Field() login = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field() delete_token_cookie = DeleteJSONWebTokenCookie.Field() delete_refresh_token_cookie = DeleteRefreshTokenCookie.Field()
class Mutation( NewsMutation, EventMutation, UserMutation, SliderMutation, ObjectType ): """ Nodo que agrupa todas las mutaciones del proyecto. Mutaciones permitidas: :class:`news.schema.NewsMutation` :class:`events.schema.EventMutation` :class:`users.schema.UserMutation` :class:`sliders.schema.SliderMutation` También agrega las mutaciones que permiten la autenticación mediante JWT. `Más información <https://django-graphql-jwt.domake.io/en/stable/>`_. """ #: autenticación por JWT. token_auth = ObtainJSONWebToken.Field() #: verifica la validez de un token. verify_token = Verify.Field() #: obtiene un nuevo token alargando la vida de la sesión. refresh_token = Refresh.Field() #: invalida un token. revoke_token = Revoke.Field()
class Mutation(object): token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field() delete_token_cookie = DeleteTokens.Field() update_samples = UpdateSamplesMutation.Field() change_password = ChangePasswordMutation.Field()
class Mutation(ObjectType): """Accessible GraphQL mutations.""" token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field() request = RequestMutation.Field() supply = SupplyMutation.Field()
class AuthMutations(graphene.ObjectType): login = Login.Field(description="Identifies a registered user.") token_refresh = Refresh.Field( description="""Authentication tokens need to be refreshed regularly. If a token has not been refreshed with some time, it is invalidated. For example, it can be that such a token would expire in one year but needs to be refreshed every month. If it hasn't been refreshed within a month, then it is invalidated.""") token_verify = VerifyToken.Field( description="Verifies if an authentication token is valid.") consumer_create = ConsumerCreate.Field( description="Creates a new consumer.") consumer_activate = ConsumerActivate.Field( description="Activates a user account.") password_reset = PasswordReset.Field(description="Resets a user password.") set_password = SetPassword.Field(description="Sets a user password.")
class AuthMutation(ObjectType[Any]): """Authentication root mutation.""" login = ObtainJSONWebToken.Field() refresh = Refresh.Field()
class JSONWebTokenMutation(ObjectType): token_auth = ObtainJSONWebToken2.Field() verify_token = Verify.Field() refresh_token = Refresh.Field()
class Mutation(ObjectType, AppMutation): token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field()
class Mutation(users.schema.Mutation, diary.schema.Mutation, graphene.ObjectType): token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field()
class Mutation(ObjectType): user_create = UserCreate.Field() token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field()
class Mutation(AccountMutations): token_auth = ObtainJSONWebToken.Field() verify_token = Verify.Field() refresh_token = Refresh.Field()