Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
SSE Directory Access Protocol (LDAP proxy + meta information)
Ruby Shell CoffeeScript JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
db
doc
features/support
lib
log
public
script
spec
tmp
vendor
.gitignore
.rbenv-version
.rspec
.rvmrc
Gemfile
Gemfile.lock
README.md
Rakefile
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.