Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I believe in SharePoint 2007 you could authenticate a user programatically (without a password) using something like this: FormsAuthentication.RedirectFromLoginPage(username, false);

In SharePoint 2010 since FBA moved to claims we need to use something like this: SPClaimsUtility.AuthenticateFormsUser(site, username, password);

Is there an equivalent using SharePoint 2010 that you can use that does not require a password?

share|improve this question

3 Answers 3

up vote 0 down vote accepted

I ended up writing my own custom membership and roles provider. This allowed me to not have to use the default FBA configuration in SharePoint 2010 that now uses Claims. This article got me started. I then customized to meet my requirements.

http://blog.sharedove.com/adisjugo/index.php/2011/01/05/writing-a-custom-membership-provider-and-using-it-for-fba-forms-based-authentication-in-sharepoint-2010-from-the-scratch/

share|improve this answer
    
obautista I'm in the same situation and I already have my own custom membership provider can you tell me how you got it working with your custom provider? from what I can see the claims base authentication generally is like a wrapper around your custom provider. Even if you create a custom method within your custom provider, which doesn't require a password, how were you able to get the claim base authentication to call it and generate a valid token for it? I forgot to add that I need both the normal authentication method that require username and password and the one that doesn't require pass –  user9020 Jun 21 '12 at 19:07

You can check if anonymous access is enabled on

Please check this Site

http://mysharepointwork.blogspot.in/2011/05/check-if-anonymous-access-is-enabled.html

share|improve this answer
    
This answer does not really help with the scenario above. The question is how to authenticate users, not allow anonymous. –  Milen Dimov Nov 20 '13 at 12:55

I think there is a small confusion here.

The RedirectFromLoginPage method comes from System.Web.Security class, which is not a SharePoint class. So, you should be able to call this method even in SharePoint 2010 by specifying using System.Web.Security.

Moreover this method is not used for authenticating a user. It only redirects an authenticated user back to the originally requested URL or the default URL. The parameter username of this method should be an authenticated user. Check the usage here.

Whenever you call RedirectFromLoginPage method, you will be calling it inside the Membership.ValidateUser(username,password) method to authenticate the user first.

Using the method SPClaimsUtility.AuthenticateFormsUser would be preferable.

share|improve this answer
    
My apologies on the confusion. Is there a way to programatically authenticate a user without requiring the password? –  obautista Mar 13 '12 at 1:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.