How to use session on frapi

140 views
Skip to first unread message

Teerapol Sa

unread,
Aug 20, 2012, 5:10:15 AM8/20/12
to frap...@googlegroups.com
I want to use session for auth and check data , how to use it?


Best Regard,

David Coallier

unread,
Aug 20, 2012, 5:13:05 AM8/20/12
to frap...@googlegroups.com
RESTful APIs should never use sessions and that's why there's
explicitly no facility to do this in FRAPI.

Every request should be independent. The term is usually "stateless"
which means no "state" is maintained between requests.

Should you wish to use sessions, you'll have to implement something
yourself but you could do it in a custom-auth handler.


On 20 August 2012 10:10, Teerapol Sa <teer...@gmail.com> wrote:
> I want to use session for auth and check data , how to use it?
>
>
> Best Regard,



--
David Coallier

Teerapol Sa

unread,
Aug 20, 2012, 5:53:00 AM8/20/12
to frap...@googlegroups.com
Thank you for your answer,  You mean I must to  implement  my  class for support session?
I see at library folder  , it has Zend Session.  I can use it?  and how to use ?


Regard,



เมื่อ วันจันทร์ที่ 20 สิงหาคม ค.ศ. 2012, 16 นาฬิกา 10 นาที 15 วินาที UTC+7, Teerapol Sa เขียนว่า:

Max Frigge

unread,
Aug 20, 2012, 6:07:57 AM8/20/12
to frap...@googlegroups.com
As far as I know it's only used for the admin gui. 

The thing is .. FRAPI is a tool to create rest services.. and a rest service is stateless.. thus has no sessions.

Long story short... either use FRAPI without session .. or use another framework with session.

Teerapol Sa

unread,
Aug 20, 2012, 7:10:26 AM8/20/12
to frap...@googlegroups.com
interesting at  custom-auth handler. How to?

Sorry for a lot of question  I'm junior programmer and a little experience in  php , framwwork , api.

Regard,

เมื่อ วันจันทร์ที่ 20 สิงหาคม ค.ศ. 2012, 16 นาฬิกา 10 นาที 15 วินาที UTC+7, Teerapol Sa เขียนว่า:
I want to use session for auth and check data , how to use it?


Best Regard,

Max Frigge

unread,
Aug 20, 2012, 9:26:08 AM8/20/12
to frap...@googlegroups.com
In RESTful environments OAuth is a common authentication mechanism.


There are many resources on the web that further explain RESTful services and authentication... have a look.

Basically every request includes a hash (created with a private key) and a public key which are used on the server for authentication purposes.
Reply all
Reply to author
Forward
0 new messages