소스 검색

Deprecate storage of Authentication object in AuthenticationException.

Luke Taylor 14 년 전
부모
커밋
8fd2963e6b
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      core/src/main/java/org/springframework/security/core/AuthenticationException.java

+ 3 - 0
core/src/main/java/org/springframework/security/core/AuthenticationException.java

@@ -64,11 +64,14 @@ public abstract class AuthenticationException extends RuntimeException {
 
     /**
      * The authentication request which this exception corresponds to (may be {@code null})
+     * @deprecated to avoid potential leaking of sensitive information (e.g. through serialization/remoting).
      */
+    @Deprecated
     public Authentication getAuthentication() {
         return authentication;
     }
 
+    @Deprecated
     public void setAuthentication(Authentication authentication) {
         this.authentication = authentication;
     }