[fossil-users] JSON API and WSDL

2011-09-14 Thread Stephan Beal
Hi, all, "It would be cool if" the JSON API had a way to serve a WSDL of its API. i'm looking to pick someone's brain about WSDL, namely regarding: a) Is WSDL intended only for SOAP (in which case it is not interesting here)? b) Does anyone know of a JSON-format WSDL-like language? What i'd like

Re: [fossil-users] JSON API and WSDL

2011-09-14 Thread Martin S. Weber
On 09/14/11 11:21, Stephan Beal wrote: Hi, all, "It would be cool if" the JSON API had a way to serve a WSDL of its API. i'm looking to pick someone's brain about WSDL, namely regarding: a) Is WSDL intended only for SOAP (in which case it is not interesting here)? See section 4 [1] of the WSD

Re: [fossil-users] JSON API and WSDL

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 5:31 PM, Martin S. Weber wrote: > bindings for WSDL; there is support for mimetypes, and thus > application/json application/x-javascript text/javascript text/x-javascript > (take your pick or use > something completely different ;)) > i think you just found a bug in my co

[fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Richard Hipp
I'm schedule to give a 3.5 hour in-depth tutorial on Fossil on Tuesday, Oct 25 from 09:00 to 12:30 in Manassas VA as part of the 2011 Tcl/Tk conference. See http://www.tcl.tk/community/tcl2011/schedule.html for schedule and registration information. In addition to usual high-level information abo

Re: [fossil-users] JSON API and WSDL

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 5:40 PM, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 5:31 PM, Martin S. Weber wrote: > >> [1] http://www.w3.org/TR/wsdl#_**http >> [2] http://www.w3.org/TR/wsdl > > > Thank you very much :). i'll go get myself more informed on the topic.

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 5:42 PM, Richard Hipp wrote: > I'm schedule to give a 3.5 hour in-depth tutorial on Fossil on Tuesday, Oct > 25 from 09:00 to 12:30 in Manassas VA as part of the 2011 Tcl/Tk > conference. Will there be a video of it online afterwards? :) -- - stephan beal http://wa

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Wes Freeman
Any discount codes for fossil user group members? Manassas is convenient for me, so I would consider going just for your talk. Thanks, Wes ___ fossil-users mailing list fossil-users@lists.fossil-scm.org http://lists.fossil-scm.org:8080/cgi-bin/mailman/li

Re: [fossil-users] JSON API and WSDL

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 5:31 PM, Martin S. Weber wrote: > [1] http://www.w3.org/TR/wsdl#_**http > [2] http://www.w3.org/TR/wsdl > > To follow up: http://tools.ietf.org/html/draft-zyp-json-schema-03 looks interesting (but i need to finish reading it). And WSDL 2

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 11:57 AM, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 5:42 PM, Richard Hipp wrote: > >> I'm schedule to give a 3.5 hour in-depth tutorial on Fossil on Tuesday, >> Oct 25 from 09:00 to 12:30 in Manassas VA as part of the 2011 Tcl/Tk >> conference. > > > Will there be a vi

[fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
Hello, anyone who's intimate with fossil's authentication code... i've decided not to punt the authentication problem (now moving it to the start of the TODO list) because authentication levels end up changing the output generated by some requests (e.g. whether or not links are generated from comm

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 6:19 PM, Richard Hipp wrote: > I checked with the conference organizers and they tell me "no". The > tutorials are how they defray the fixed costs of putting on the conference > in the first place. And that makes sense. > Fair enough. Could we convince you to "accidenta

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 6:28 PM, Stephan Beal wrote: > Fair enough. Could we convince you to "accidentally" leave your webcam > turned on during the presentation (and conveniently point it as the screen)? > ;) > Or do they have an option to buy a copy online? That'd be win-win for them, i'd thin

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Remigiusz Modrzejewski
On Sep 14, 2011, at 6:28 PM, Stephan Beal wrote: > Fair enough. Could we convince you to "accidentally" leave your webcam > turned on during the presentation (and conveniently point it as the screen)? > ;) Isn't it easier and more responsible to just record a rehearsal? Kind regards, Remigiusz

Re: [fossil-users] Fossil tutorial - Oct 25 in Manassas VA

2011-09-14 Thread Wes Freeman
On Wed, Sep 14, 2011 at 12:19 PM, Richard Hipp wrote: > > I also asked about Wes's question of a discount.  They pointed out to me > that you can register for just this one tutorial and not the technical > sessions.  But, again, the tutorial fees are how they pay for the room, so > no discounts. >

[fossil-users] proposed cleanup to g.okXXX code?

2011-09-14 Thread Stephan Beal
Hi, all, i'm wondering if anyone would be against me making the following change to the 'g' object: Extend its structure to include: struct FossilPermissions { char setup; char admin; ... repeat for all current g.okXXX bits ... } perm; Remove all of the g.okXXX members, replacing their us

Re: [fossil-users] proposed cleanup to g.okXXX code?

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 12:52 PM, Stephan Beal wrote: > Hi, all, > > i'm wondering if anyone would be against me making the following change to > the 'g' object: > > Extend its structure to include: > > struct FossilPermissions { > char setup; > char admin; > ... repeat for all current g.okX

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Ron Wilson
On Wed, Sep 14, 2011 at 12:27 PM, Stephan Beal wrote: > b) For non-login JSON requests, first check the request info (GET/POST) for > an authorization token. If found, i need to be able to tell fossil, "here's > your cookie - use this one." i.e. i need to be able to make fossil think it > got a co

Re: [fossil-users] proposed cleanup to g.okXXX code?

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 6:57 PM, Richard Hipp wrote: > On Wed, Sep 14, 2011 at 12:52 PM, Stephan Beal wrote: > >> ...struct FossilPermissions { >> char setup; >> char admin; >> ... repeat for all current g.okXXX bits ... >> } perm; >> > > I think this is a great idea. > i've got this ready

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 7:15 PM, Ron Wilson wrote: > Are you proposing supporting non-HTTP transport of JSON client-server > interaction? > No, but for supporting clients which don't have cookies support. e.g. i've written Java HTTP client apps (using a similar API to this one, actually) but the

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 7:24 PM, Stephan Beal wrote: > No, but for supporting clients which don't have cookies support. e.g. i've > written Java HTTP client apps (using a similar API to this one, actually) > but the client code doesn't support cookies, so it has to pass around its > authenticatio

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 12:27 PM, Stephan Beal wrote: > Hello, anyone who's intimate with fossil's authentication code... > > i've decided not to punt the authentication problem (now moving it to the > start of the TODO list) because authentication levels end up changing the > output generated by

Re: [fossil-users] proposed cleanup to g.okXXX code?

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 1:22 PM, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 6:57 PM, Richard Hipp wrote: > >> On Wed, Sep 14, 2011 at 12:52 PM, Stephan Beal wrote: >> >>> ...struct FossilPermissions { >>> char setup; >>> char admin; >>> ... repeat for all current g.okXXX bits ... >>> }

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 7:36 PM, Richard Hipp wrote: > I'm thinking you don't need to change or enhance any of this for JSON. > Thank you for the very detailed response. It sounds like i'll have to touch less code than i was expecting, but i think the one place i need to change would be a way to

Re: [fossil-users] proposed cleanup to g.okXXX code?

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 7:36 PM, Richard Hipp wrote: > Branch, please > http://fossil-scm.org/index.html/timeline?r=stephan-hack It touches a lot of files but the changes are minimal. Note that g.okRead translates to g.perm.Read as opposed to g.perm.read because... it was easiest to automate t

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 1:42 PM, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 7:36 PM, Richard Hipp wrote: > >> I'm thinking you don't need to change or enhance any of this for JSON. >> > > Thank you for the very detailed response. It sounds like i'll have to touch > less code than i was expect

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 8:05 PM, Richard Hipp wrote: > cgi_set_parameter("fossil-ABCDEF", "xx"); > Great :). i now see cgi_replace_parameter(), which is what i really want (because the JSON auth info will be processed after fossil has done its cookie cutting). Thanks! -- - stephan bea

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 2:20 PM, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 8:05 PM, Richard Hipp wrote: > >> cgi_set_parameter("fossil-ABCDEF", "xx"); >> > > Great :). i now see cgi_replace_parameter(), which is what i really want > (because the JSON auth info will be processed after fos

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 8:30 PM, Richard Hipp wrote: > To clarify, Fossil uses a single namespace to hold all environment > variables, ...parameter. They all work the same. > That's a bonus for me, actually. i'm currently digging around in login_check_credentials() and friends to figure out whe

Re: [fossil-users] fossil update FAIL

2011-09-14 Thread sky5walk
Ok, Didn't realize there was a disconnected Leaf in the remote repo. c:\myrepo> fossil merge 88d803c051 worked. We still are unsure what created the disconnect? Though we seem to have hiccups when upgrading the fossil.exe and doing rebuilds on both local and remote repos. On Tue, Aug 30, 2011 a

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Ben Summers
On 14 Sep 2011, at 18:26, Stephan Beal wrote: > On Wed, Sep 14, 2011 at 7:24 PM, Stephan Beal wrote: >> No, but for supporting clients which don't have cookies support. e.g. i've >> written Java HTTP client apps (using a similar API to this one, actually) >> but the client code doesn't support

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Joshua Paine
On 9/14/2011 4:22 PM, Ben Summers wrote: HTTP basic authentication is widely supported in HTTP client libraries, and much less hassle to use than passing tokens around. The three major downsides with HTTP Basic Auth are: 1) No pretty login page 2) No reliable way to logout in most browsers 3)

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 10:22 PM, Ben Summers wrote: > HTTP basic authentication is widely supported in HTTP client libraries, and > much less hassle to use than passing tokens around. > Supporting that is certainly on the list of things to do. i'm currently still ironing out how to internally

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Richard Hipp
On Wed, Sep 14, 2011 at 4:30 PM, Joshua Paine wrote: > On 9/14/2011 4:22 PM, Ben Summers wrote: > >> HTTP basic authentication is widely supported in HTTP client >> libraries, and much less hassle to use than passing tokens around. >> > > The three major downsides with HTTP Basic Auth are: > > 1)

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Ben Summers
On 14 Sep 2011, at 21:36, Richard Hipp wrote: > > > On Wed, Sep 14, 2011 at 4:30 PM, Joshua Paine wrote: > On 9/14/2011 4:22 PM, Ben Summers wrote: >>> HTTP basic authentication is widely supported in HTTP client >>> libraries, and much less hassle to use than passing tokens around. >>> >> Th

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Joshua Paine
On 9/14/2011 4:36 PM, Richard Hipp wrote: Fossil honors the REMOTE_USER environment variable in CGI mode, so you can use Fossil with Basic Auth. How quickly I forget... FTR, I'm not suggesting changing fossil's web ui, just suggesting the HTTP Basic Auth would be the easiest thing for clients

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 10:51 PM, Joshua Paine wrote: > FTR, I'm not suggesting changing fossil's web ui, just suggesting the > HTTP Basic Auth would be the easiest thing for clients of a JSON API. > i'm working on all that right this moment, as a matter of fact. > Seems like this unfortunately

Re: [fossil-users] JSON authentication: meshing with the cookie mechanism

2011-09-14 Thread Stephan Beal
On Wed, Sep 14, 2011 at 10:51 PM, Joshua Paine wrote: > FTR, I'm not suggesting changing fossil's web ui, just suggesting the > A related point: once the JSON login is working we could actually run the login from the UI in AJAX mode, as opposed to a separate request. We should be able to incremen

[fossil-users] JSON login demo: is this interface acceptable?

2011-09-14 Thread Stephan Beal
Hi, all! Just implemented... Request: GET: /json/login?n=name&p=pass Param names "n" and "p" are for compatibility with the current usage, and may optionally be written out as "name" and "password". or POST: /json/login POST request body: { "payload":{"name":"...", "password":"..."} } (POSTed

[fossil-users] RFC: new config option name

2011-09-14 Thread Stephan Beal
Hiya! The JSON API returns errors in the form of 4-digit error codes, as described here: https://docs.google.com/document/d/1fXViveNhDbiXgCuE7QDXQOKeFzf2qNUkBEgiUvoqFN4/edit?hl=en_US The codes are grouped such that we can "dumb down" error codes to be less specific (w/ 3 levels of specificity),

[fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Stephan Beal
Hi again, As Richard mentioned earlier, the current fossil login mechanism does not tolerate a given user being logged in multiple times (each new login invalidates the previous one). While this almost certainly isn't a real limitation for the HTML interface, it will eventually become one for the

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Ross Berteig
At 04:17 PM 9/14/2011, Stephan Beal wrote: >Would this modification be acceptable in fossil? i know it's a >bit unconventional, but should be a fairly simple change to make >with no backwards compatibility concerns (because fossil doesn't >support multiple logins for one user right now). Chiming

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Stephan Beal
On Thu, Sep 15, 2011 at 1:30 AM, Ross Berteig wrote: > At 04:17 PM 9/14/2011, Stephan Beal wrote: > >Would this modification be acceptable in fossil? i know it's a > >bit unconventional, but should be a fairly simple change to make > >with no backwards compatibility concerns (because fossil doesn

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Ross Berteig
At 04:33 PM 9/14/2011, Stephan Beal wrote: > >i think if we got rid of (gasp!) the IP check we could easily >implement this, but i can't just take that part out without a >blessing from the higher powers. I found a thread that I started back in March of 2010 about this from a user experience

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Stephan Beal
On Thu, Sep 15, 2011 at 2:54 AM, Ross Berteig wrote: > ... from a user experience point of view. The thread stalled out > after a patch was offered by Kyle McKay[1] that would have > dropped the use of the IP adderss in the session cookie hash, > allowing the same session cookie to be used from

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Weber, Martin S
> Ross Berteig: > I should be possible to support more than one session cookie per > user, but then you would need a process to occasionally purge > stale sessions from the server. You could do that check on any > session validation, if its been long enough since the last check. > Or at least check

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Altu Faltu
With the method suggested at below link, I see a problem that if I logout from one machine my auth token for other machine will also be invalidated. It would be simple to have one auth token for each login and purge stale auth tokens regularly. Purging stale tokens should be a matter of few SQL

Re: [fossil-users] same user, multiple logins: the problem and a potential solution

2011-09-14 Thread Ben Summers
On 15 Sep 2011, at 00:17, Stephan Beal wrote: > > As Richard mentioned earlier, the current fossil login mechanism does not > tolerate a given user being logged in multiple times (each new login > invalidates the previous one). While this almost certainly isn't a real > limitation for the HTML