JANOS Help System: [Commands] [Topics] [Tech Support] [Printable Manual] [Search]
JMP Protocol INITIAL CONNECTION To initialize communications the client should send a blank or empty message. { "Message":"" } This message properly formatted for JMP Port 9220 would be transmitted as follows. [14,{"Message":""}] The connection will proceed depending on the authentication requirements established by configuration and the client environment for the connection. With the login requirement the exchange will proceed as follows. In this example the client properly utilizes the supplied Nonce to properly calculate a digest inclusive of the login credentials for the username 'jnior'. The response indicates successful login and that the account has Administrator and Control permissions. All Administrators have the ability to control the JNIOR. Not all accounts with Control permission are administrators. TRANSMITTED RECEIVED { "Message":"" } { "Message":"Error", "Text":"401 Unauthorized", "Nonce":"5d894efb48e1c3bc074fe78e7a5f" } { "Auth-Digest":"jnior:65f2d1cb66ef63f7d17a764f3a2f2508" } { "Message":"Authenticated", "Administrator":true, "Control":true } A "Monitor" message will likely immediately follow. This might even be received before the "Authenticated" message. That is the asynchronous nature of the connection. DIGEST CALCULATION When the JMP connection requires a login it will respond with a "401 Unauthorized" error text. The server provides a unique "Nonce" string as part of this message. This can be used in conjunction with the username and password to calculate the appropriate Authorization Digest. This requires a MD5 message digest calculation which generates a 16 byte digest represented as 32 hexadecimal characters. The calculation proceeds as follows: Digest = Username + ":" + MD5(Username + ":" + Nonce + ":" + Password) Where Username, Password, Nonce and Digest are all strings. The resulting Digest string is returned in the "Auth-Digest" member. Here is an example login with the default administrator's account. TRANSMITTED RECEIVED { "Message":"" } { "Message":"Error", "Text":"401 Unauthorized", "Nonce":"bc581a9683d3e1857218db135e4b" } { "Auth-Digest":"jnior:6b7b418f223e7e0dc600c41c7b6644b3" } { "Message":"Authenticated", "Administrator":true, "Control":true } SEE ALSO HELP Topics: MESSAGING, SECURITY, JMP, JMPCONNECT [/flash/manpages/protocol.hlp:184]