Documentation for #2351

This commit is contained in:
Maxime Besson 2020-12-21 21:28:01 +01:00
parent ec0c8214f7
commit 48b96dbaae
3 changed files with 32 additions and 11 deletions

View File

@ -468,6 +468,7 @@ To update the master encryption key:
key 'xxxxxxxxxxxxxxx'
.. _cli-sessions:
Sessions Management
-------------------
@ -491,6 +492,15 @@ Modify session ::
lemonldap-ng-sessions setKey 9684dd2a6489bf2be2fbdd799a8028e3 \
authenticationLevel 1
.. versionadded:: 2.0.10
Delete all sessions by username
::
lemonldap-ng-sessions delete --where uid=dwho
Second Factors management
-------------------------

View File

@ -68,6 +68,10 @@ To configure sessions, go in Manager, ``General Parameters`` »
Command-line tools
==================
.. versionadded:: 2.0.9
You can use the ``lemonldap-ng-sessions`` tool to search, update or delete sessions. See a few examples in :ref:`the examples page <cli-sessions>`
- LLNG Portal provides a simple tool to delete a session:
``llngDeleteSession``. To use it, simply give it the user identifier
*(wildcard are authorizated)*:

View File

@ -125,7 +125,7 @@ Options:
--select Select which fields to print
--backend Specify session backend
--persistent Search in persistent sessions
--where Set search filter (search only)
--where Set search filter (search/delete only)
--id-only Only return IDs (search only)
@ -133,14 +133,14 @@ Options:
=head2 Get
lemonldap-ng-sessions get <id> [<id> ...]
lemonldap-ng-sessions get <id> [<id> ...]
This command lets you read the content of a session.
You must pass one or several session IDs as parameters.
Exemples
Examples
lemonldap-ng-sessions get 9684dd2a6489bf2be2fbdd799a8028e3
@ -148,7 +148,7 @@ Exemples
=head2 Search
lemonldap-ng-sessions search [<options>]
lemonldap-ng-sessions search [<options>]
This command lets you search for sessions.
@ -172,21 +172,28 @@ Examples
=head2 Delete
lemonldap-ng-sessions delete <id> [<id> ...]
lemonldap-ng-sessions delete <id> [<id> ...]
lemonldap-ng-sessions delete --where <filter>
This command lets you delete a session.
This command lets you delete sessions.
You may give it one or several session IDs to remove.
Exemples:
Examples:
lemonldap-ng-sessions delete 9684dd2a6489bf2be2fbdd799a8028e3
lemonldap-ng-sessions delete --persistent dwho
Or you can give it a search expression.
Examples:
lemonldap-ng-sessions delete --where uid=dwho
=head2 Set Key
lemonldap-ng-sessions setKey <id> <key> <value> [<key> <value> ...]
lemonldap-ng-sessions setKey <id> <key> <value> [<key> <value> ...]
This command allows you to modify one or several keys from an existing session.
@ -198,7 +205,7 @@ Examples:
=head2 Delete Key
lemonldap-ng-sessions delKey <id> <key> [<key> ...]
lemonldap-ng-sessions delKey <id> <key> [<key> ...]
This command lets you remove a key from an existing session.
@ -212,7 +219,7 @@ Examples:
=head2 Second Factors
lemonldap-ng-sessions secondfactors <command> <user> [<id> ... ]
lemonldap-ng-sessions secondfactors <command> <user> [<id> ... ]
Commands:
@ -226,7 +233,7 @@ Commands:
=head2 Consents
lemonldap-ng-sessions consents <command> <user> [<id> ... ]
lemonldap-ng-sessions consents <command> <user> [<id> ... ]
Commands: