Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
eec71f2f
Commit
eec71f2f
authored
9 years ago
by
ocelot-inc
Browse files
Options
Downloads
Patches
Plain Diff
Fixes gh-1193 on_auth trigger: clarify when exactly on_auth event occurs.
parent
692f9da2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/sphinx/book/box/triggers.rst
+6
-8
6 additions, 8 deletions
doc/sphinx/book/box/triggers.rst
doc/sphinx/dev_guide/box-protocol.rst
+2
-0
2 additions, 0 deletions
doc/sphinx/dev_guide/box-protocol.rst
with
8 additions
and
8 deletions
doc/sphinx/book/box/triggers.rst
+
6
−
8
View file @
eec71f2f
...
...
@@ -9,12 +9,6 @@ certain events happen. Currently the main types of triggers are `connection trig
which are executed when a session begins or ends, and `replace triggers`_ which are
for database events.
:func:`box.session.on_connect`, |br|
:func:`box.session.on_disconnect`, |br|
:func:`box.session.on_auth`, |br|
:func:`space_object.on_replace`, |br|
:func:`space_object.run_triggers`
All triggers have the following characteristics:
* They associate a `function` with an `event`. The request to "define a trigger"
...
...
@@ -134,9 +128,13 @@ Here is what might appear in the log file in a typical installation:
.. function:: box.session.on_auth(trigger-function [, old-trigger-function-name])
Define a trigger for execution during authentication.
The on_auth trigger function is invoked after the on_connect trigger function,
The on_auth trigger function is invoked in these circumstances:
(1) The :func:`console.connect` function includes an authentication check for all users except 'guest';
for this case the on_auth trigger function is invoked after the on_connect trigger function,
if and only if the connection has succeeded so far.
For this purpose, connection and authentication are considered to be separate steps.
(2) The binary protocol has a separate :ref:`authentication packet <iproto-authentication>` --
for this case, connection and authentication are considered to be separate steps.
Unlike other trigger types, on_auth trigger functions are invoked `before`
the event. Therefore a trigger function like :code:`function auth_function () v = box.session.user(); end`
...
...
This diff is collapsed.
Click to expand it.
doc/sphinx/dev_guide/box-protocol.rst
+
2
−
0
View file @
eec71f2f
...
...
@@ -168,6 +168,8 @@ may be absent in request's header, that means that there'll be no version
checking, but it must be present in the response. If ``schema_id`` is sent in
the header, then it'll be checked.
.. _iproto-authentication:
================================================================================
Authentication
================================================================================
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment