>From what I have determined, to do this manually I would have to call
the following:
set_login_attempted(True)
validate_identity(user_name, pw, visit_key)
The validate_identity call is made on the identity provider object
corresponding to the current visit. I am looking through the
libraries for access to that provider, whether through the
IdentityVisitPlugin, or some other object, but I am not sure that
there isn't a better way.
The problem is that Turbogears only provides the following methods in
the IdentityVisitPlugin to make this more automatic:
def identity_from_http_auth(self, visit_key):
def identity_from_visit(self, visit_key):
def identity_from_form(self, visit_key):
My options are to add another here to accomodate my RPC request, or to
do those parts manually in my root controller. Any thoughts? Thanks.
-eric
On Jan 16, 1:24 pm, Eric Snow <[EMAIL PROTECTED]> wrote:
> The project I am currently working on involves building an RPC
> interface for an internal system. I am hoping to use turbogears. The
> tgwebservices library is helping, but what do I need to do to make use
> of identity? For example, suppose I have the following in my root
> controller:
>
> @wsexpose(str)
> @wsvalidate(str, str)
> def login(self, login, enc_password):
> ...
>
> What needs to go into login to authenticate that login id and set it
> as the current user? I want to return a session ID. Keep in mind
> that this method will be used in an ajax call by the client, and will
> expect a sort of session id for that authenticated user.
>
> From what I could discern, cherrypy will handle some of the login
> stuff (maybe I misunderstood). However, it is not readily apparent at
> what point a user is authenticated, nor how. I am just trying to use
> turbogears for my RPC server (via tgwebservices) and still make use of
> other features, like identity. Thanks.
>
> -eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---