Re: [Bulk] Re: Seaside, JWT and REST

Sebastian Heidbrink <[email protected]>
Newsgroups gmane.comp.lang.smalltalk.squeak.seaside
Message-ID <[email protected]>
asFunction: ?!?! That easy? I was expecting a Block fore the whole 
onBeforeSend as parameter....

Oh boy! Thank you very much Paul! I will implement my test and then I'll 
let the list know if it worked....

Sebastian


Am 21.10.2015 um 13:44 schrieb Paul DeBruicker:
> There is the JQAjaxSetup>>#onBeforeSend: method and you'd use it like:
>
>
> html anchor
>         url:'javascript(0);',
>         onClick: (html jQuery ajax
>                                    callback: [self processCallBack];
>                                    onBeforeSend:(JSStream on: ('if
> ($window.sessionStorage.token) {
>             xhr.setRequestHeader("Authorization", "Bearer " +
> $window.sessionStorage.token);} ' asFunction: #('xhr')));
>         with: 'do the thing'.
>
>
> Beware that's in email client code so may not work exactly but you get the
> gist of it I think.
>
>
>
> SebastianHC wrote
>> Okay,
>>
>> I found some information that would at least give me a chance to not add
>> additional load to my seaside server.
>> But unfortunately I can not find any documentation on the "ajax
>> beforeSend" topic in Seaside's history.
>>
>> How do I implement the "beforeSend" part of this script in Seaside?
>>
>> Thank you!
>> Sebastian
>>
>>
>>
>>
>> Am 21.10.2015 um 11:26 schrieb Sebastian Heidbrink:
>>> Hi!
>>>
>>> I have a working JWT (JsonWebToken) protected Zinc based REST server.
>>> I do also have a Seaside server as a user platform.
>>>
>>> Now I would like to integrate some results of the REST interfaces of
>>> the Zinc based server into my seaside frontend.
>>> How would I define an ajax call including a JWT token in Seaside that
>>> populates a table rendered by seaside on/after page load?
>>>
>>> Thank you for any ideas!
>>> Sebastian
>>> _______________________________________________
>>> seaside mailing list
>>>
>> [email protected]
>>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>>>
>> _______________________________________________
>> seaside mailing list
>> [email protected]
>> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
>
> --
> View this message in context: http://forum.world.st/Seaside-JWT-and-REST-tp4857137p4857153.html
> Sent from the Seaside General mailing list archive at Nabble.com.
> _______________________________________________
> seaside mailing list
> [email protected]
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.