function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Joel Rydbeck.ax5Joel Rydbeck.ax5 

self service portal authentication

I'm looking for a way to authenticate my self-service portal users (trouble-ticket area) without them actually logging into the self service site.  Does the login call published in the API work for these users?

niknik
The API documentation specifies that because of security reasons, you can not query the password of any user. The way around this is to sit in the middle between the users login, and the self-service portal by intercepting the users username and password request, and then relaying it to the self-service portal login page.

This means that you can take ordinary Salesforce users and turn them into de-facto accounts by having a single master account for all web services communications to the server.

We had to do this for an earlier project, and you can see the code (PHP) here:

http://www.nik.com.au/sforce-ss-auth.txt

Regards,

Nik Cubrilovic
Solutionstap.com
mike kreadenmike kreaden

Nik,

Please explain in detail the use case for your solution. 

I think that I get it, but this is open to perplexing interpretations.  I believe that you have a set of assumptions being made, in terms of parity between salesforce.com users and customer self-service users.

 

Joel Rydbeck.ax5Joel Rydbeck.ax5

I've taken the approach that Nik took --although I don't have PHP available on my server, lynx is able to do the authentication and gives me back different pages/redirects based on whether the username/password are correct.  If there was any way I could authenticate contact passwords this would be a lot cleaner through XML-RPC.

- Joel

niknik
I just realised that there are a few assumptions in my initial post, apologies. The result is that you can take a self-service users username and password, and relay the information within your application to authenticate them. Once they are authenticated then you use a single Salesforce account to run the queries on their behalf. You would have to build access levels into the application. It is complex, but it is a nice workaround to not being able to authenticate self-service users directly by querying the API.

You don't need to use the API, since self-service will return a True or False on an authentication attempt.

A case where this is used, is if you have an application where you would like to enable your contacts to have login access to your Salesforce-based application. This means that you can use Salesforce to handle the password issuing, reissuing and account management for your website (just like with self-service, but a customised site).

Mike, if you wish, I would be able to demonstrate an application working on this principle for you.

Regards,

Nik

Solutionstap
DwainLDwainL

nik wrote:
....A case where this is used, is if you have an application where you would like to enable your contacts to have login access to your Salesforce-based application. This means that you can use Salesforce to handle the password issuing, reissuing and account management for your website (just like with self-service, but a customised site).

Mike, if you wish, I would be able to demonstrate an application working on this principle for you.

Regards,

Nik

Solutionstap




Nik,

This is exactly the scenerio we are trying to develop a solution for ( a customized self-service portal) and I would be very interested in a demonstration / sample of your work.
cwcw

I am trying to use this same approach in our application -- i.e., to login a Self-Service user by POSTing to the self-service login URL and then using a single Salesforce.com user as a proxy to make calls on the self-service user's behalf.  Does anyone know of a way to get the ID corresponding to the self-service user from the Contact table?

gcrockergcrocker

Is there a way to authenticate Self Service users via SOAP yet?  This would be very handy for a current project, though the workaround mentioned above will work in a pinch.

Thanks,

-glenn

 

dave k.ax63dave k.ax63
I've stumbled across this thread and the sample code for authentication has come in very handy (thanks nik).

What I'm trying to get my head around is how to apply this technique to allow users to change their own passwords by calling changepassword.jsp through Curl/PHP.

Does anyone have any insights into what cookies and POST variables are needed to get this working ?

Cheers

Dave
md1md1
Hi Nik,

Can you tell me which API call is used to log in to the Self Service ? Or which page do we send the username and password to ? We've tried to send 'un' for username and 'pw' for password to 'https://ssl.salesforce.com/sserv/login.jsp' in the query string - but it gives a blank page stating 'You are no longer logged in. Your session may have timed out.
Please login again to continue.'

Thanks,

Manu Dewan
Team Lead (Java)
Theikos Inc.
www.theikos.com
Justin AkehurstJustin Akehurst

dave k wrote:
I've stumbled across this thread and the sample code for authentication has come in very handy (thanks nik).

What I'm trying to get my head around is how to apply this technique to allow users to change their own passwords by calling changepassword.jsp through Curl/PHP.

Does anyone have any insights into what cookies and POST variables are needed to get this working ?

Cheers

Dave



Do you or anyone else still have the sample code provided by Nik to do this authentication?