SSO 로그오프 방법 제공하기

인증서버의 로그오프 페이지를 호출할 수 있는 url을 설정해서 사용자가 필요에 따라 실행할 수 있도록 합니다.

샘플코드

Default.aspx.cs
protected string logoffUrl = string.Empty;

// 인증 객체 선언(Request와 Response 인계)
AuthCheck authCheck = new AuthCheck(Page.Request, Page.Response);

// 로그오프 URL 설정
logoffUrl = authCheck.CurrentSSOSite.GetLogoffUrl(Page.Request) + "?" +					authCheck.CurrentSSOProvider.RequestSSOSiteParam + "=" +
authCheck.CurrentSSOSite.ID + "&" +
authCheck.CurrentSSOProvider.GetParamName(ParamInfo.RETURN_URL) + "=" +
HttpUtility.UrlEncode(authCheck.ThisURL, Encoding.UTF8);
Default.aspx
<a href="<%=logoffUrl %>">Logoff</a>

Last updated

Was this helpful?