Authentication Resource. This can be used to authenticate an existing SID.
Validate the given SID
name | type | description |
---|---|---|
sid | path | sid + gcn_session_secret (taken from the GCN_SESSION_SECRET cookie) to validate |
media type | data type | description |
---|---|---|
application/json | AuthenticationResponse (JSON) | response containing validation result and (possibly) a user |
GET /auth/validate/{sid} Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "CRITICAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "INFO",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "MAINTENANCEMODE",
"responseMessage" : "...",
"property" : "..."
}
}
Perform a login to the system with SSO systems
media type | data type | description |
---|---|---|
text/plain | (custom) | SID or "NOTFOUND" or "FAILURE" |
GET /auth/login Accept: text/plain
HTTP/1.1 200 OK
Content-Type: text/plain
...
Perform a login to the system with SSO systems
media type | data type | description |
---|---|---|
text/plain | (custom) | SID or "NOTFOUND" or "FAILURE" |
GET /auth/ssologin Accept: text/plain
HTTP/1.1 200 OK
Content-Type: text/plain
...
Perform a login to the system based on user credentials. If the user is successfully authenticated, create a new session and send back the sid. If a new sessionSecret is created, set it as a cookie
name | type | description | default |
---|---|---|---|
sid | query | Optional: Existing sid number, the stored secret must match the cookie | 0 |
media type | data type | description |
---|---|---|
application/json | LoginRequest (JSON) | login request (contains the login credentials) |
media type | data type | description |
---|---|---|
application/json | LoginResponse (JSON) | login response |
POST /auth/login
Content-Type: application/json
Accept: application/json
{
"login" : "...",
"password" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"sid" : "...",
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "SUCCESS",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "NEUTRAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "INVALIDDATA",
"responseMessage" : "...",
"property" : "..."
}
}
Perform a login to the system based on RSA signature. If the user is successfully authenticated, create a new session and send back the sid. If a new sessionSecret is created, set it as a cookie.
name | type | description | default |
---|---|---|---|
sid | query | Optional: Existing sid number, the stored secret must match the cookie | 0 |
media type | data type | description |
---|---|---|
application/json | LoginWithRsaRequest (JSON) | login request (contains the login credentials) |
media type | data type | description |
---|---|---|
application/json | LoginResponse (JSON) | login response |
POST /auth/loginwithrsa
Content-Type: application/json
Accept: application/json
{
"username" : "...",
"salt" : "...",
"expirationTimestamp" : 12345,
"rsaSignature" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"sid" : "...",
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "INFO",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "CRITICAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "MAINTENANCEMODE",
"responseMessage" : "...",
"property" : "..."
}
}
Do a logout for the current session
name | type | description | default | constraints |
---|---|---|---|---|
sid | path | |||
allSessions | query | 0 | boolean |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | generic response |
POST /auth/logout/{sid} Accept: application/json
HTTP/1.1 201 Created
Content-Type: application/json
{
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "WARNING",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "WARNING",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "PERMISSION",
"responseMessage" : "...",
"property" : "..."
}
}
Create a hash of the given password and userID The hashing algorithm can change at any time. As this method is possibly expensive (depends on the implemented hash algorithm), we don't allow anonymous access to it.
name | type | description | default | constraints |
---|---|---|---|---|
sid | query | 0 | int |
media type | data type | description |
---|---|---|
application/json | HashPasswordRequest (JSON) | Password request object |
media type | data type | description |
---|---|---|
application/json | HashPasswordResponse (JSON) | HashPasswordResponse |
POST /auth/hashpassword
Content-Type: application/json
Accept: application/json
{
"password" : "...",
"userId" : 12345
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"hash" : "...",
"user" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
}, {
"id" : 12345,
"name" : "...",
"description" : "...",
"children" : [ { }, { } ]
} ],
"login" : "...",
"password" : "..."
},
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "SUCCESS",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "CRITICAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "MAINTENANCEMODE",
"responseMessage" : "...",
"property" : "..."
}
}
Checks if the given password matches the given hash As this method is possibly expensive (depends on the implemented hash algorithm), we don't allow anonymous access to it.
name | type | description | default | constraints |
---|---|---|---|---|
sid | query | 0 | int |
media type | data type | description |
---|---|---|
application/json | MatchPasswordRequest (JSON) | Password match request object |
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | GenericResponse |
POST /auth/matchpassword
Content-Type: application/json
Accept: application/json
{
"password" : "...",
"hash" : "..."
}
HTTP/1.1 201 Created
Content-Type: application/json
{
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "NEUTRAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "NEUTRAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "FAILURE",
"responseMessage" : "...",
"property" : "..."
}
}
Returns the global prefix
media type | data type | description |
---|---|---|
application/json | GenericResponse (JSON) | GenericResponse |
GET /auth/globalprefix Accept: application/json
HTTP/1.1 200 OK
Content-Type: application/json
{
"messages" : [ {
"fieldName" : "...",
"message" : "...",
"type" : "NEUTRAL",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
}, {
"fieldName" : "...",
"message" : "...",
"type" : "WARNING",
"timestamp" : 12345,
"image" : "...",
"sender" : {
"id" : 12345,
"firstName" : "...",
"lastName" : "...",
"description" : "...",
"email" : "...",
"groups" : [ { }, { } ],
"login" : "...",
"password" : "..."
},
"id" : 12345
} ],
"responseInfo" : {
"responseCode" : "PERMISSION",
"responseMessage" : "...",
"property" : "..."
}
}