C# 클래스 DataAvail.Mvc.Account.OAuthAccountController

1. Derive your current account controller with this one. /// a. Override GetErrorCodeFromString() method. /// b. In LogOn Action add base.BeforeLogOn() before return View. 2. Add da.openid.css to _Layout page 2. Add @Html.Partial("_LogOnOAuth") to the LogOn view. 3. Add @Html.Partial("_LogInOAuth") to the LogIn view. 4. Define Twitter and Facebook keys in the config file. 5. In the web.conig file add to the membership profile tag - inherits="YOUR_NAMESPACE.AccountProfile" After this the tag should look like this 6. Add to _Layout.html
상속: Controller
파일 보기 프로젝트 열기: data-avail/open-mvc

Private Properties

프로퍼티 타입 설명
GetSuccessResult System.Web.Mvc.ActionResult
OAuthGetErrorResult System.Web.Mvc.ActionResult
OAuthGetExtWindowSuccessResult System.Web.Mvc.ActionResult
OAuthGetFacebookLogOnUrl string
OAuthIsExtWindow bool
OAuthPrepareReturnUrl string
OAuthRegisterOrLoginExternalUser string

공개 메소드들

메소드 설명
OAuth ( string serviceName ) : System.Web.Mvc.ActionResult
OAuthAccountController ( ) : System
OAuthLogOff ( ) : System.Web.Mvc.ActionResult
OpenId ( string ServiceUrl ) : System.Web.Mvc.ActionResult

보호된 메소드들

메소드 설명
GetErrorCodeFromString ( MembershipCreateStatus createStatus ) : string
OAuthBeforeLogOn ( ) : void

Invoke this method in LogOn action before return LogOn View! There is initialized important data for _LogOnOAuth view.

OAuthGetErrorMessage ( IAuthenticationResponse AuthenticationResponse ) : string

비공개 메소드들

메소드 설명
GetSuccessResult ( OAuthServiceType ServiceType, string UserName, string ReturnUrl ) : System.Web.Mvc.ActionResult
OAuthGetErrorResult ( string ErrorMessage = null ) : System.Web.Mvc.ActionResult
OAuthGetExtWindowSuccessResult ( string UserName, string ReturnUrl ) : System.Web.Mvc.ActionResult
OAuthGetFacebookLogOnUrl ( string UrlAuthority, string ReturnUrl ) : string
OAuthIsExtWindow ( OAuthServiceType ServiceType ) : bool
OAuthPrepareReturnUrl ( ) : string
OAuthRegisterOrLoginExternalUser ( string UserName, OAuthServiceLogOnIdentifyer ServiceIdentifyer ) : string

메소드 상세

GetErrorCodeFromString() 보호된 메소드

protected GetErrorCodeFromString ( MembershipCreateStatus createStatus ) : string
createStatus MembershipCreateStatus
리턴 string

OAuth() 공개 메소드

public OAuth ( string serviceName ) : System.Web.Mvc.ActionResult
serviceName string
리턴 System.Web.Mvc.ActionResult

OAuthAccountController() 공개 메소드

public OAuthAccountController ( ) : System
리턴 System

OAuthBeforeLogOn() 보호된 메소드

Invoke this method in LogOn action before return LogOn View! There is initialized important data for _LogOnOAuth view.
protected OAuthBeforeLogOn ( ) : void
리턴 void

OAuthGetErrorMessage() 보호된 메소드

protected OAuthGetErrorMessage ( IAuthenticationResponse AuthenticationResponse ) : string
AuthenticationResponse IAuthenticationResponse
리턴 string

OAuthLogOff() 공개 메소드

public OAuthLogOff ( ) : System.Web.Mvc.ActionResult
리턴 System.Web.Mvc.ActionResult

OpenId() 공개 메소드

public OpenId ( string ServiceUrl ) : System.Web.Mvc.ActionResult
ServiceUrl string
리턴 System.Web.Mvc.ActionResult