Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TOTP server for technical site
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
edugain
eduGAIN OT
TOTP server for technical site
Commits
296cb557
Commit
296cb557
authored
1 year ago
by
Tomasz Wolniewicz
Browse files
Options
Downloads
Patches
Plain Diff
fixing the text
parent
1001b6ee
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+10
-10
10 additions, 10 deletions
README.md
with
10 additions
and
10 deletions
README.md
+
10
−
10
View file @
296cb557
# TOTP server for technical site
This is a simple back-end server meant to run in a secure enviromnent full with access to the database where users' TOTP secrets are stored.
The server use
d
HTTP to respond to GET queries. It a
zz
epts two parameters
-
user - here you provide the user identifier as passed f
o
rm eduTEAMS - this argument is mandatory
-
otp - the one-time time-based code entered by the user, this is optional
The server use
s
HTTP to respond to GET queries. It a
cc
epts two parameters
-
user - here you provide the user identifier as passed fr
o
m eduTEAMS - this argument is mandatory
-
otp - the one-time
,
time-based code entered by the user, this is optional
## Functions and return values
The server return a json-encoded integer:
The server return
s
a json-encoded integer:
*
-1 - user not found in the database (otp argument not required)
*
0 - user exists but there was a missmatch in the code (otp argument required)
*
1 - there was a success in verification of the code against the user secret (otp argument required)
...
...
@@ -18,22 +18,22 @@ The server return a json-encoded integer:
*
4 - the code has been used for a second time (otp argument required)
When a code is verified, its value is written into the database as the "last_code" value to prevent reuse. Also the "verified" value
is set to 1 (this is an ovekill as only needs to be done on the first succesful verification, but simplefies the code).
The server reads the user's secret f
o
rm the database, calculates the corresponding TOTP value and campares to the value provided.
is set to 1 (this is an ove
r
kill as
it
only needs to be done on the first succesful verification, but simplefies the code).
The server reads the user's secret fr
o
m the database, calculates the corresponding TOTP value and campares to the value provided.
The server may also be used to test if users exist in the database and whet
e
hr they have ever successfully entered a
n
TOPT code.
This function is used by the login interface to determine if the registration needs to be perfored and the first confiramtion OTP
The server may also be used to test if users exist in the database and wheth
e
r they have ever successfully entered a TOPT code.
This function is used by the login interface to determine if the registration needs to be perfor
m
ed and the first confiramtion OTP
code is required.
## Installation
The server works with the
**otp**
database which is shared with the t
h
echnical site installation.
The server works with the
**otp**
database which is shared with the technical site installation.
You must define user
**otp**
or whatever you decide to call it (and set in the otp_config.php).
### Without Docker
All you need is a https server with ph
o
and mysql support. The server will need to make outside connections to the database host.
All you need is a
n
https server with ph
p
and mysql support. The server will need to make outside connections to the database host.
If you run stuff within secure environment (as you should) you do not need https.
...
...
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