8000 GitHub - kavod/synoAuth: Synology Authentification API
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

kavod/synoAuth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

synoAuth

Synology Authentification API

This project provides (for moment):

  • A python class and CGI API in order to get active login basic information from synotoken value
  • A Javascript class in order to get synoToken value of the active session

Dependency

  • A Synology Disk Station
  • The javascript uses JQuery but call the google hosted library (neither required localy nor included in package)

Setup

Go to a Releases to get the latest synoAuth.spk Use package Center of DSM in order to install You may have to adapt the "Trust Level" to "Any publisher" since this package is not yet "validated" by Synology Inc. It's done!

Build from sources

Just execute make in the folder in order to build synoAuth.spk

CGI API class

By calling /webman/3rdparty/synoAuth/ with synoToken querystring (with GET or POST) you get a JSON response with user data (for moment: username & usergroups) if, and only if:

  • you browser has an logged in and active session in DSM
  • the provided synoToken matches with IP Address and auth Cookie id

Javascript class

Since CGI API needs synoToken, synoAuth provides a javascript class in order to get the active session synoToken. This class also provide the following customEvents in order to notify $(document) about session verification process:

  • synoToken event is raised when synoToken determination is done
  • login event is raised when userdata and usergroups determination is done

Usage example

A simple script is available in /webman/3rdparty/synoAuth/test.html

About

Synology Authentification API

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0