Automatic user logon

27/03/2009

A user can be logged into your web-to-print portal automatically by passing required parameters in the referral request. This feature is only available if you know user ID and password.

Call parameters

The query string and parameters depend on what sort of web-to-print call you are making with the referral. E.g. it may be passing a user to a web-to-print template, a catalog or some other page. Whatever the call is, include the following parameters:

  • ID – an existing user id
  • Hash – an MD5 hash of the user’s IP address and the password

Important: this call cannot be used with user-friendly URLs ending with .htm or .html. Use permalinks with IDs.

HTTP GET example: http://orders.example.com/?page=template;TemplateID=9A54D348-CC92-47ED-840E-2A22CF395D18;ID=A85C9EFD-803C-494f-A5BD-2E1F3AFF5977;Hash=ed80b9eb36925084f68c90da3eaca5a7

HTTP POST example: http://orders.example.com/?page=template;TemplateID=9A54D348-CC92-47ED-840E-2A22CF395D18

<input type=”hidden” name=”ID” value=”A85C9EFD-803C-494f-A5BD-2E1F3AFF5977″ />

<input type=”hidden” name=”Hash” value=”ed80b9eb36925084f68c90da3eaca5a7″ />

Logging-on process

Every time ZetaPrints web-to-print system receives a request that includes ID and Hash parameters it retrieves user details by ID, checks the password and the user’s IP address against the supplied hash and logs the user in. The user gets a cookie with the ID and does not need to log in again as long as the IP address is the same and the cookie is there.

Depending on scenario, the user may need to go between your external system and your ZetaPrints web-to-print portal several times to complete a task. This is specially the case if ZetaPrints interface is shown in a frame. Pass user ID and the hash every time the user is referred to ZetaPrints to ensure automatic logon.

A 404-error screen is shown if the user cannot be logged in.

Make sure the ID exists, the password/hash is correct and the user has access to required resource.

See also: