Page tree
Skip to end of metadata
Go to start of metadata

Authorize a WebApi-Session that has previously created with createWebApiSession.

API version

1.0

Working example URL: https://en.onlinedemo.picapport.de/picapportapi/1.0/authorizeWebApiSession?uid=picapport&pw=encodedPassword

Parameter

NameTypeSince
version
RequiredValue(s)
apisidstring7.4yesSession-ID returned from createWebApiSession.
uidstring7.4yesA valid PicApport user ID
pwstring7.4yes

The encrypted password. The encryption algorithm used is based on the algorithm returned from the
createWebApiSession.

If configuration parameter webapi.DISABLE.PASSWORD.ENCRYPTION
has been set to true password must not be encrypted.

Check the authorizeWebApiSession() function in sourcecode(select view source) of PicApport WebApi-frontend on https://en.onlinedemo.picapport.de/picapport-webapitest.html.

Example code for password encryption with Forge if algorithm = RSA
var password = document.getElementById("pw").value;
var encryptedPassword = forge.util.createBuffer(
                          forge.pki.rsa.encrypt(password, forge.pki.setRsaPublicKey(
                             new forge.jsbn.BigInteger(enc.modulus, 16),
                             new forge.jsbn.BigInteger(enc.exponent, 16)), 2)).toHex();
                              



returnatuboolean9.2no

Optional parameter. If Set to true the AccsessTokenUser for the account will be returned if it exists.

We strongly recommend to use the parameter only in https:// secured environments.

Result

mime typeapplication/json
contentSession token to identify the authorized session
http status codes
  • 200 OK
  • 400 Bad Request
  • 403 Forbidden
  • 404 Not Found
  • 500 Internal Server Error
  • 501 Not implemented

Result:JSON

Name Type

Since
version

Value
apisidstring7.4Session-ID returned from createWebApiSession
uidstring7.4A valid PicApport user ID
atustring9.2Return the AccessTokenUser of the account if it exists and
if request parameter returnatu has been set to true.
  • No labels