View Javadoc
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    */
8   @SuppressWarnings("serial")
9   public class UnauthorizedClientException extends ClientAuthenticationException {
10  
11  	public UnauthorizedClientException(String msg, Throwable t) {
12  		super(msg, t);
13  	}
14  
15  	public UnauthorizedClientException(String msg) {
16  		super(msg);
17  	}
18  
19  	@Override
20  	public int getHttpErrorCode() {
21  		// The spec says this can be unauthorized
22  		return 401;
23  	}
24  
25  	@Override
26  	public String getOAuth2ErrorCode() {
27  		return "unauthorized_client";
28  	}
29  }