Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

SSE Directory Access Protocol (LDAP proxy + meta information)

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 app
Octocat-spinner-32 config
Octocat-spinner-32 db
Octocat-spinner-32 doc
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 log
Octocat-spinner-32 public
Octocat-spinner-32 script
Octocat-spinner-32 spec
Octocat-spinner-32 tmp
Octocat-spinner-32 vendor
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rbenv-version
Octocat-spinner-32 .rspec
Octocat-spinner-32 .rvmrc
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 config.ru
README.md

SSEDAP

SSE Directory Access Protocol (LDAP proxy + meta information)

API Usage

NOTE: You must perform these requests over SSL. Posting credentials via plain HTTP is both insecure, and will result in an error response from the SSEDAP server.

The following examples assume your server is at https://ssedap.local

Response Codes

200 OK                     - Success!
400 Bad Request            - Not using the API via SSL
401 Unauthorized           - Incorrect/missing credentials - see "error" message for details
404 Not Found              - Successful authentication, but server resource not found
500 Internal Server Error  - SSEDAP failure - see "error" message for details
501 Not Implemented        - API method not found

Authenticating

Request

POST /api/authorize HTTP/1.1
Host: ssedap.local
Content-Type: application/x-www-form-urlencoded
Content-Length: [length of data]

username=your_ldap_user123&password=supersecret

Response

{
  "success": (true|false),
  "user": "your_ldap_user123",
  "user_info": {
    "somekey": "somevalue",
    ...
  },
  "error": "some text"
}

"error" will only be present when success == false.
"user_info" will only be present when success == true.

Requesting information about a user

You must be an officer/admin to retrieve information via this method.

NOTE: Requests for a user that doesn't exist will result in a 200 OK and an empty "user_info" dictionary.

Request

POST /api/userinfo HTTP/1.1
Host: ssedap.local
Content-Type: application/x-www-form-urlencoded
Content-Length: [length of data]

username=your_ldap_user123&password=supersecret&lookup=other_ldap_user456

Response

{
  "success": (true|false),
  "user": "your_ldap_user123",
  "lookup": "other_ldap_user456",
  "user_info": {
    "somekey": "somevalue",
    ...
  },
  "error": "some text"
}

"error" will only be present when success == false.
"user_info" will only be present when success == true.
Something went wrong with that request. Please try again.