티스토리 뷰
public class AuthorizationAttribute : FilterAttribute, IAuthorizationFilter
{
void IAuthorizationFilter.OnAuthorization(AuthorizationContext filterContext)
{
HttpCookie cookie = filterContext.RequestContext.HttpContext.Request.Cookies.Get("AccessToken");
Controller controller = filterContext.Controller as Controller;
if (cookie == null || string.IsNullOrEmpty(WebConfig.SessionUserID))
{
controller.HttpContext.Response.Redirect(redirectUrl);
//filterContext.Result = new RedirectToRouteResult( new RouteValueDictionary {
// { "controller", "Home" }
// , { "action", "Index" }
//});
}
if (!this.dataEncryption.PBKDF2Compare(cookie.Value, this.dataEncryption.PBKDF2(this.dataEncryption.SHA1Decrypt(WebConfig.SessionUserID, WebConfig.Salt), WebConfig.Salt, int.Parse(WebConfig.Iteration))))
{
controller.HttpContext.Response.Redirect(redirectUrl);
}
}
private DataEncryption dataEncryption = new DataEncryption();
private string redirectUrl = WebConfig.SignInUrl;
public string RedirectUrl
{
get { return redirectUrl; }
set { redirectUrl = value; }
}
}
- Total
- Today
- Yesterday
- docker
- java.sql
- 스프링 프레임워크(spring framewordk)
- await
- java web-mvc
- REST API
- 제품 등록
- jstl(java standard tag library)
- 표현 언어(expression language)
- 특정 문자를 기준으로 자르기
- 람다식(lambda expression)
- .submit()
- nl2br
- 인텔리제이(intellij)
- In App Purchase
- error-java
- java-개발 환경 설정하기
- System.Diagnostics
- 메이븐(maven)
- MainActor
- 문자 자르기
- system.io
- jsp 오픈 소스
- 스프링 프레임워크(spring framework)
- 진수 변환
- 스프링 시큐리티(spring security)
- React
- 스프링 시큐리티(spring security)-http basic 인증
- jstl(java standard tag library)-core
- java 키워드 정리
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |