001/******************************************************************************* 002 * Copyright 2017 The MIT Internet Trust Consortium 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 *******************************************************************************/ 016package org.mitre.openid.connect.client; 017 018import org.springframework.security.authentication.AuthenticationServiceException; 019 020public class AuthorizationEndpointException extends AuthenticationServiceException { 021 022 private static final long serialVersionUID = 6953119789654778380L; 023 024 private String error; 025 026 private String errorDescription; 027 028 private String errorURI; 029 030 public AuthorizationEndpointException(String error, String errorDescription, String errorURI) { 031 super("Error from Authorization Endpoint: " + error + " " + errorDescription + " " + errorURI); 032 this.error = error; 033 this.errorDescription = errorDescription; 034 this.errorURI = errorURI; 035 } 036 037 public String getError() { 038 return error; 039 } 040 041 public String getErrorDescription() { 042 return errorDescription; 043 } 044 045 public String getErrorURI() { 046 return errorURI; 047 } 048 049 /* (non-Javadoc) 050 * @see java.lang.Object#toString() 051 */ 052 @Override 053 public String toString() { 054 return "AuthorizationEndpointException [error=" + error + ", errorDescription=" + errorDescription + ", errorURI=" + errorURI + "]"; 055 } 056}