Examples of errorOnInvalidType()


Examples of org.springframework.security.core.annotation.AuthenticationPrincipal.errorOnInvalidType()

            return null;
        }
        Object principal = authentication.getPrincipal();
        if(principal != null && !parameter.getParameterType().isAssignableFrom(principal.getClass())) {
            AuthenticationPrincipal authPrincipal = findMethodAnnotation(AuthenticationPrincipal.class, parameter);
            if(authPrincipal.errorOnInvalidType()) {
                throw new ClassCastException(principal + " is not assignable to " + parameter.getParameterType());
            } else {
                return null;
            }
        }
View Full Code Here

Examples of org.springframework.security.core.annotation.AuthenticationPrincipal.errorOnInvalidType()

            return null;
        }
        Object principal = authentication.getPrincipal();
        if(principal != null && !parameter.getParameterType().isAssignableFrom(principal.getClass())) {
            AuthenticationPrincipal authPrincipal = findMethodAnnotation(AuthenticationPrincipal.class, parameter);
            if(authPrincipal.errorOnInvalidType()) {
                throw new ClassCastException(principal + " is not assignable to " + parameter.getParameterType());
            } else {
                return null;
            }
        }
View Full Code Here

Examples of org.springframework.security.web.bind.annotation.AuthenticationPrincipal.errorOnInvalidType()

            return null;
        }
        Object principal = authentication.getPrincipal();
        if(principal != null && !parameter.getParameterType().isAssignableFrom(principal.getClass())) {
            AuthenticationPrincipal authPrincipal = findMethodAnnotation(AuthenticationPrincipal.class, parameter);
            if(authPrincipal.errorOnInvalidType()) {
                throw new ClassCastException(principal + " is not assignable to " + parameter.getParameterType());
            } else {
                return null;
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.