#834 Definitive reference code for version 3 auth

Glenn Pierce Thu 2 Jul

Hi I am trying to get a basic server running for my rust code. As a first step I just want to support auth.

I am having a hard time with the auth.

Is https://github.com/skyfoundry/haystack-java

the definitive code that demonstrates the spec ?

What I am looking for is a basic client that I can test against my server so I can see I am on the right track. I can compile haystack-java but can't find any executable or way to run a simple test client. Am I missing something ?

I have tried using quite a few projects on the downloads links but they don't seem to support version 3.0 or lack docs or don't build.

Reading the docs on auth https://www.project-haystack.org/doc/Auth#authMechs

I am also a little confused by something. Does the authentication header have to be sent to the url /haystack/about or can that url be server defined ?


Glenn Pierce Thu 2 Jul

Ah my last question was answered on that page. I missed it. "The authentication protocol is a series of HTTP requests to the server. The URI to use for authentication is determined by the server."

Brian Frank Thu 2 Jul

Hi Glenn,

The Java code is a good reference implementation. If you look at the HClient class you can see it has a main you can call to test your server:

java -jar haystack.jar org.projecthaystack.client.HClient <uri> <user> <pass>

Then there is some debug you can uncomment AuthClientContext.java to help see what its doing.

Login or Signup to reply.