001/*
002 * oauth2-oidc-sdk
003 *
004 * Copyright 2012-2016, Connect2id Ltd and contributors.
005 *
006 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use
007 * this file except in compliance with the License. You may obtain a copy of the
008 * License at
009 *
010 *    http://www.apache.org/licenses/LICENSE-2.0
011 *
012 * Unless required by applicable law or agreed to in writing, software distributed
013 * under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
014 * CONDITIONS OF ANY KIND, either express or implied. See the License for the
015 * specific language governing permissions and limitations under the License.
016 */
017
018package com.nimbusds.oauth2.sdk.client;
019
020
021import com.nimbusds.oauth2.sdk.ErrorObject;
022import com.nimbusds.oauth2.sdk.http.HTTPResponse;
023
024
025/**
026 * OAuth 2.0 client registration errors.
027 */
028public final class RegistrationError {
029        
030        
031        /**
032         * Client registration: The value of one or more {@code redirect_uris} 
033         * is invalid. 
034         */
035        public static final ErrorObject INVALID_REDIRECT_URI =
036                new ErrorObject("invalid_redirect_uri", "Invalid redirection URI(s)", HTTPResponse.SC_BAD_REQUEST);
037        
038        
039        /**
040         * Client registration: The value of one of the client meta data fields
041         * is invalid and the server has rejected this request. Note that an 
042         * authorisation server may choose to substitute a valid value for any 
043         * requested parameter of a client's meta data. 
044         */
045        public static final ErrorObject INVALID_CLIENT_METADATA =
046                new ErrorObject("invalid_client_metadata", "Invalid client metadata field", HTTPResponse.SC_BAD_REQUEST);
047
048
049        /**
050         * Client registration: The software statement presented is invalid.
051         */
052        public static final ErrorObject INVALID_SOFTWARE_STATEMENT =
053                new ErrorObject("invalid_software_statement", "Invalid software statement", HTTPResponse.SC_BAD_REQUEST);
054
055
056        /**
057         * Client registration: The software statement presented is not
058         * approved for use by this authorisation server.
059         */
060        public static final ErrorObject UNAPPROVED_SOFTWARE_STATEMENT =
061                new ErrorObject("unapproved_software_statement", "Unapproved software statement", HTTPResponse.SC_BAD_REQUEST);
062
063        
064        /**
065         * Prevents public instantiation.
066         */
067        private RegistrationError() { }
068}