1 package org.springframework.security.oauth2.common.exceptions; 2 3 /** 4 * Exception thrown when a client was unable to authenticate. 5 * 6 * @author Ryan Heaton 7 * @author Dave Syer 8 */ 9 @SuppressWarnings("serial") 10 public class InvalidClientException extends ClientAuthenticationException { 11 12 public InvalidClientException(String msg) { 13 super(msg); 14 } 15 16 @Override 17 public int getHttpErrorCode() { 18 return 401; 19 } 20 21 @Override 22 public String getOAuth2ErrorCode() { 23 return "invalid_client"; 24 } 25 }