사용자가 자신의 OpenID로 인증 할 수있는 SharePoint 2010 용 약간의 프로젝트를 진행 중입니다.SharePoint 2010에서 암호없이 양식 사용자 인증
현재 작동 방식 SQL에 기반한 멤버십 및 역할 공급자가 있습니다. 내 로그인 페이지는 DotNetOpenAuth를 사용하여 인증 요청을 OpenID 엔드 포인트로 보냅니다. 긍정적 인 응답을 얻으면 OpenID 인물에서 전자 메일 주소를 읽고 해당 전자 메일 주소가있는 MembershipUser에 대한 세션을 만듭니다 (해당 끝점을 알고있는 경우). 해당 사용자가 존재하지 않으면 새로운 MembershipUser를 작성하고 엔드 포인트를 comment 특성에 저장합니다. 그러면 다른 사람의 전자 메일 주소로 로그인하기 위해 자신의 개인 설정을 편집 할 수 없습니다.
이 방법은 문제가 있지만 세션을 만드는 데 문제가 있습니다. 저는 현재 다음과 같은 코드로이 작업을 수행 :
//authenticate
SecurityToken token = SPSecurityContext.SecurityTokenForFormsAuthentication(new Uri(SPContext.Current.Web.Url),userProvider,roleProvider,username,user.GetPassword());
SPFederationAuthenticationModule.Current.SetPrincipalAndWriteSessionToken(token);
하지만 비트는 한 번만 암호화하기 때문에 멤버 자격 공급자가 암호를 암호화하지 않는 경우, 그냥 사용자의 암호를 읽고에서 사용할 수 없습니다 작동 그 방법.
사용자 로그인을 허용하는 방법을 찾고 싶었지만 간단한 방법으로 찾을 수없는 것 같습니다.
FormsAuthentication.SetAuthCookie(username, false);
그냥 예외를 (내가 그 방법은 표준 FBA입니다 때문에 그건 생각하고 만들어 사용
하지 클레임 기반 FBA하지만 난 그냥 추측하고있어. 내장 FBA 로그인 제어 그래도 사용자 이름과 비밀번호는 작동합니다.)
System.ArgumentException: Exception of type 'System.ArgumentException' was thrown. Parameter name: encodedValue
at Microsoft.SharePoint.Administration.Claims.SPClaimEncodingManager.DecodeClaimFromFormsSuffix(String encodedValue)
at Microsoft.SharePoint.Administration.Claims.SPClaimProviderManager.GetProviderUserKey(String encodedSuffix)
at Microsoft.SharePoint.SPGlobal.CreateSPRequestAndSetIdentity(SPSite site, String name, Boolean bNotGlobalAdminCode, String strUrl, Boolean bNotAddToContext, Byte[] UserToken, String userName, Boolean bIgnoreTokenTimeout, Boolean bAsAnonymous)
at Microsoft.SharePoint.SPWeb.InitializeSPRequest()
at Microsoft.SharePoint.WebControls.SPControl.EnsureSPWebRequest(SPWeb web)
at Microsoft.SharePoint.WebControls.SPControl.SPWebEnsureSPControl(HttpContext context)
at Microsoft.SharePoint.ApplicationRuntime.BaseApplication.Application_PreRequestHandlerExecute(Object sender, EventArgs e)
at Microsoft.SharePoint.ApplicationRuntime.SPRequestModule.PreRequestExecuteAppHandler(Object oSender, EventArgs ea)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
간단히 말해서 비밀번호를 사용하지 않고도 회원을위한 토큰을 만들 수 있습니다.
누구나이 경험이 있거나 내가 원하는 것을 얻을 수있는 아이디어가 있습니까?
미리 감사드립니다.