xref: /plugin/pureldap/vendor/freedsx/ldap/src/FreeDSx/Ldap/Operation/ResultCode.php (revision dad993c57a70866aa1db59c43f043769c2eb7ed0)
10b3fd2d3SAndreas Gohr<?php
2*dad993c5SAndreas Gohr
30b3fd2d3SAndreas Gohr/**
40b3fd2d3SAndreas Gohr * This file is part of the FreeDSx LDAP package.
50b3fd2d3SAndreas Gohr *
60b3fd2d3SAndreas Gohr * (c) Chad Sikorra <Chad.Sikorra@gmail.com>
70b3fd2d3SAndreas Gohr *
80b3fd2d3SAndreas Gohr * For the full copyright and license information, please view the LICENSE
90b3fd2d3SAndreas Gohr * file that was distributed with this source code.
100b3fd2d3SAndreas Gohr */
110b3fd2d3SAndreas Gohr
120b3fd2d3SAndreas Gohrnamespace FreeDSx\Ldap\Operation;
130b3fd2d3SAndreas Gohr
140b3fd2d3SAndreas Gohr/**
150b3fd2d3SAndreas Gohr * Message response result codes. Defined in RFC 4511, 4.1.9
160b3fd2d3SAndreas Gohr *
170b3fd2d3SAndreas Gohr * @author Chad Sikorra <Chad.Sikorra@gmail.com>
180b3fd2d3SAndreas Gohr */
190b3fd2d3SAndreas Gohrclass ResultCode
200b3fd2d3SAndreas Gohr{
210b3fd2d3SAndreas Gohr    public const SUCCESS = 0;
220b3fd2d3SAndreas Gohr
230b3fd2d3SAndreas Gohr    public const OPERATIONS_ERROR = 1;
240b3fd2d3SAndreas Gohr
250b3fd2d3SAndreas Gohr    public const PROTOCOL_ERROR = 2;
260b3fd2d3SAndreas Gohr
270b3fd2d3SAndreas Gohr    public const TIME_LIMIT_EXCEEDED = 3;
280b3fd2d3SAndreas Gohr
290b3fd2d3SAndreas Gohr    public const SIZE_LIMIT_EXCEEDED = 4;
300b3fd2d3SAndreas Gohr
310b3fd2d3SAndreas Gohr    public const COMPARE_FALSE = 5;
320b3fd2d3SAndreas Gohr
330b3fd2d3SAndreas Gohr    public const COMPARE_TRUE = 6;
340b3fd2d3SAndreas Gohr
350b3fd2d3SAndreas Gohr    public const AUTH_METHOD_UNSUPPORTED = 7;
360b3fd2d3SAndreas Gohr
370b3fd2d3SAndreas Gohr    public const STRONGER_AUTH_REQUIRED = 8;
380b3fd2d3SAndreas Gohr
390b3fd2d3SAndreas Gohr    public const REFERRAL = 10;
400b3fd2d3SAndreas Gohr
410b3fd2d3SAndreas Gohr    public const ADMIN_LIMIT_EXCEEDED = 11;
420b3fd2d3SAndreas Gohr
430b3fd2d3SAndreas Gohr    public const UNAVAILABLE_CRITICAL_EXTENSION = 12;
440b3fd2d3SAndreas Gohr
450b3fd2d3SAndreas Gohr    public const CONFIDENTIALITY_REQUIRED = 13;
460b3fd2d3SAndreas Gohr
470b3fd2d3SAndreas Gohr    public const SASL_BIND_IN_PROGRESS = 14;
480b3fd2d3SAndreas Gohr
490b3fd2d3SAndreas Gohr    public const NO_SUCH_ATTRIBUTE = 16;
500b3fd2d3SAndreas Gohr
510b3fd2d3SAndreas Gohr    public const UNDEFINED_ATTRIBUTE_TYPE = 17;
520b3fd2d3SAndreas Gohr
530b3fd2d3SAndreas Gohr    public const INAPPROPRIATE_MATCHING = 18;
540b3fd2d3SAndreas Gohr
550b3fd2d3SAndreas Gohr    public const CONSTRAINT_VIOLATION = 19;
560b3fd2d3SAndreas Gohr
570b3fd2d3SAndreas Gohr    public const ATTRIBUTE_OR_VALUE_EXISTS = 20;
580b3fd2d3SAndreas Gohr
590b3fd2d3SAndreas Gohr    public const INVALID_ATTRIBUTE_SYNTAX = 21;
600b3fd2d3SAndreas Gohr
610b3fd2d3SAndreas Gohr    public const NO_SUCH_OBJECT = 32;
620b3fd2d3SAndreas Gohr
630b3fd2d3SAndreas Gohr    public const ALIAS_PROBLEM = 33;
640b3fd2d3SAndreas Gohr
650b3fd2d3SAndreas Gohr    public const INVALID_DN_SYNTAX = 34;
660b3fd2d3SAndreas Gohr
670b3fd2d3SAndreas Gohr    public const ALIAS_DEREFERENCING_PROBLEM = 36;
680b3fd2d3SAndreas Gohr
690b3fd2d3SAndreas Gohr    public const INAPPROPRIATE_AUTHENTICATION = 48;
700b3fd2d3SAndreas Gohr
710b3fd2d3SAndreas Gohr    public const INVALID_CREDENTIALS = 49;
720b3fd2d3SAndreas Gohr
730b3fd2d3SAndreas Gohr    public const INSUFFICIENT_ACCESS_RIGHTS = 50;
740b3fd2d3SAndreas Gohr
750b3fd2d3SAndreas Gohr    public const BUSY = 51;
760b3fd2d3SAndreas Gohr
770b3fd2d3SAndreas Gohr    public const UNAVAILABLE = 52;
780b3fd2d3SAndreas Gohr
790b3fd2d3SAndreas Gohr    public const UNWILLING_TO_PERFORM = 53;
800b3fd2d3SAndreas Gohr
810b3fd2d3SAndreas Gohr    public const LOOP_DETECT = 54;
820b3fd2d3SAndreas Gohr
830b3fd2d3SAndreas Gohr    public const NAMING_VIOLATION = 64;
840b3fd2d3SAndreas Gohr
850b3fd2d3SAndreas Gohr    public const OBJECT_CLASS_VIOLATION = 65;
860b3fd2d3SAndreas Gohr
870b3fd2d3SAndreas Gohr    public const NOT_ALLOWED_ON_NON_LEAF = 66;
880b3fd2d3SAndreas Gohr
890b3fd2d3SAndreas Gohr    public const NOT_ALLOWED_ON_RDN = 67;
900b3fd2d3SAndreas Gohr
910b3fd2d3SAndreas Gohr    public const ENTRY_ALREADY_EXISTS = 68;
920b3fd2d3SAndreas Gohr
930b3fd2d3SAndreas Gohr    public const OBJECT_CLASS_MODS_PROHIBITED = 69;
940b3fd2d3SAndreas Gohr
950b3fd2d3SAndreas Gohr    public const AFFECTS_MULTIPLE_DSAS = 71;
960b3fd2d3SAndreas Gohr
970b3fd2d3SAndreas Gohr    public const VIRTUAL_LIST_VIEW_ERROR = 76;
980b3fd2d3SAndreas Gohr
990b3fd2d3SAndreas Gohr    public const OTHER = 80;
1000b3fd2d3SAndreas Gohr
1010b3fd2d3SAndreas Gohr    public const CANCELED = 118;
1020b3fd2d3SAndreas Gohr
1030b3fd2d3SAndreas Gohr    public const NO_SUCH_OPERATION = 119;
1040b3fd2d3SAndreas Gohr
1050b3fd2d3SAndreas Gohr    public const TOO_LATE = 120;
1060b3fd2d3SAndreas Gohr
1070b3fd2d3SAndreas Gohr    public const CANNOT_CANCEL = 121;
1080b3fd2d3SAndreas Gohr
1090b3fd2d3SAndreas Gohr    public const ASSERTION_FAILED = 122;
1100b3fd2d3SAndreas Gohr
1110b3fd2d3SAndreas Gohr    public const AUTHORIZATION_DENIED = 123;
1120b3fd2d3SAndreas Gohr
1130b3fd2d3SAndreas Gohr    public const SYNCHRONIZATION_REFRESH_REQUIRED = 4096;
114*dad993c5SAndreas Gohr
115*dad993c5SAndreas Gohr    public const MEANING_SHORT = [
116*dad993c5SAndreas Gohr        self::SUCCESS => 'success',
117*dad993c5SAndreas Gohr        self::OPERATIONS_ERROR => 'operationsError',
118*dad993c5SAndreas Gohr        self::PROTOCOL_ERROR => 'protocolError',
119*dad993c5SAndreas Gohr        self::TIME_LIMIT_EXCEEDED => 'timeLimitExceeded',
120*dad993c5SAndreas Gohr        self::SIZE_LIMIT_EXCEEDED => 'sizeLimitExceeded',
121*dad993c5SAndreas Gohr        self::COMPARE_FALSE => 'compareFalse',
122*dad993c5SAndreas Gohr        self::COMPARE_TRUE => 'compareTrue',
123*dad993c5SAndreas Gohr        self::AUTH_METHOD_UNSUPPORTED => 'authMethodNotSupported',
124*dad993c5SAndreas Gohr        self::STRONGER_AUTH_REQUIRED => 'strongerAuthRequired',
125*dad993c5SAndreas Gohr        self::REFERRAL => 'referral',
126*dad993c5SAndreas Gohr        self::ADMIN_LIMIT_EXCEEDED => 'adminLimitExceeded',
127*dad993c5SAndreas Gohr        self::UNAVAILABLE_CRITICAL_EXTENSION => 'unavailableCriticalExtension',
128*dad993c5SAndreas Gohr        self::CONFIDENTIALITY_REQUIRED => 'confidentialityRequired',
129*dad993c5SAndreas Gohr        self::SASL_BIND_IN_PROGRESS => 'saslBindInProgress',
130*dad993c5SAndreas Gohr        self::NO_SUCH_ATTRIBUTE => 'noSuchAttribute',
131*dad993c5SAndreas Gohr        self::UNDEFINED_ATTRIBUTE_TYPE => 'undefinedAttributeType',
132*dad993c5SAndreas Gohr        self::INAPPROPRIATE_MATCHING => 'inappropriateMatching',
133*dad993c5SAndreas Gohr        self::CONSTRAINT_VIOLATION => 'constraintViolation',
134*dad993c5SAndreas Gohr        self::ATTRIBUTE_OR_VALUE_EXISTS => 'attributeOrValueExists',
135*dad993c5SAndreas Gohr        self::INVALID_ATTRIBUTE_SYNTAX => 'invalidAttributeSyntax',
136*dad993c5SAndreas Gohr        self::NO_SUCH_OBJECT => 'noSuchObject',
137*dad993c5SAndreas Gohr        self::ALIAS_PROBLEM => 'aliasProblem',
138*dad993c5SAndreas Gohr        self::INVALID_DN_SYNTAX => 'invalidDNSyntax',
139*dad993c5SAndreas Gohr        self::ALIAS_DEREFERENCING_PROBLEM => 'aliasDereferencingProblem',
140*dad993c5SAndreas Gohr        self::INAPPROPRIATE_AUTHENTICATION => 'inappropriateAuthentication',
141*dad993c5SAndreas Gohr        self::INVALID_CREDENTIALS => 'invalidCredentials',
142*dad993c5SAndreas Gohr        self::INSUFFICIENT_ACCESS_RIGHTS => 'insufficientAccessRights',
143*dad993c5SAndreas Gohr        self::BUSY => 'busy',
144*dad993c5SAndreas Gohr        self::UNAVAILABLE => 'unavailable',
145*dad993c5SAndreas Gohr        self::UNWILLING_TO_PERFORM => 'unwillingToPerform',
146*dad993c5SAndreas Gohr        self::LOOP_DETECT => 'loopDetect',
147*dad993c5SAndreas Gohr        self::NAMING_VIOLATION => 'namingViolation',
148*dad993c5SAndreas Gohr        self::OBJECT_CLASS_VIOLATION => 'objectClassViolation',
149*dad993c5SAndreas Gohr        self::NOT_ALLOWED_ON_NON_LEAF => 'notAllowedOnNonLeaf',
150*dad993c5SAndreas Gohr        self::NOT_ALLOWED_ON_RDN => 'notAllowedOnRDN',
151*dad993c5SAndreas Gohr        self::ENTRY_ALREADY_EXISTS => 'entryAlreadyExists',
152*dad993c5SAndreas Gohr        self::OBJECT_CLASS_MODS_PROHIBITED => 'objectClassModsProhibited',
153*dad993c5SAndreas Gohr        self::AFFECTS_MULTIPLE_DSAS => 'affectsMultipleDSAs',
154*dad993c5SAndreas Gohr        self::OTHER => 'other',
155*dad993c5SAndreas Gohr        self::VIRTUAL_LIST_VIEW_ERROR => 'virtualListViewError',
156*dad993c5SAndreas Gohr        self::CANNOT_CANCEL => 'cannotCancel',
157*dad993c5SAndreas Gohr        self::TOO_LATE => 'tooLate',
158*dad993c5SAndreas Gohr        self::NO_SUCH_OPERATION => 'noSuchOperation',
159*dad993c5SAndreas Gohr        self::AUTHORIZATION_DENIED => 'authorizationDenied',
160*dad993c5SAndreas Gohr    ];
161*dad993c5SAndreas Gohr
162*dad993c5SAndreas Gohr    public const MEANING_DESCRIPTION = [
163*dad993c5SAndreas Gohr        self::SUCCESS => 'Indicates the successful completion of an operation.',
164*dad993c5SAndreas Gohr        self::OPERATIONS_ERROR => 'Indicates that the operation is not properly sequenced with relation to other operations (of same or different type).',
165*dad993c5SAndreas Gohr        self::PROTOCOL_ERROR => 'Indicates the server received data that is not well-formed.',
166*dad993c5SAndreas Gohr        self::TIME_LIMIT_EXCEEDED => 'Indicates that the time limit specified by the client was exceeded before the operation could be completed.',
167*dad993c5SAndreas Gohr        self::SIZE_LIMIT_EXCEEDED => 'Indicates that the size limit specified by the client was exceeded before the operation could be completed.',
168*dad993c5SAndreas Gohr        self::COMPARE_FALSE => 'Indicates that the Compare operation has successfully completed and the assertion has evaluated to FALSE or Undefined.',
169*dad993c5SAndreas Gohr        self::COMPARE_TRUE => 'Indicates that the Compare operation has successfully completed and the assertion has evaluated to TRUE.',
170*dad993c5SAndreas Gohr        self::AUTH_METHOD_UNSUPPORTED => 'Indicates that the authentication method or mechanism is not supported.',
171*dad993c5SAndreas Gohr        self::STRONGER_AUTH_REQUIRED => 'Indicates the server requires strong(er) authentication in order to complete the operation.',
172*dad993c5SAndreas Gohr        self::REFERRAL => 'Indicates that a referral needs to be chased to complete the operation.',
173*dad993c5SAndreas Gohr        self::ADMIN_LIMIT_EXCEEDED => 'Indicates that an administrative limit has been exceeded.',
174*dad993c5SAndreas Gohr        self::UNAVAILABLE_CRITICAL_EXTENSION => 'Indicates a critical control is unrecognized.',
175*dad993c5SAndreas Gohr        self::CONFIDENTIALITY_REQUIRED => 'Indicates that data confidentiality protections are required.',
176*dad993c5SAndreas Gohr        self::SASL_BIND_IN_PROGRESS => 'Indicates the server requires the client to send a new bind request, with the same SASL mechanism, to continue the authentication process.',
177*dad993c5SAndreas Gohr        self::NO_SUCH_ATTRIBUTE => 'Indicates that the named entry does not contain the specified attribute or attribute value.',
178*dad993c5SAndreas Gohr        self::UNDEFINED_ATTRIBUTE_TYPE => 'Indicates that a request field contains an unrecognized attribute description.',
179*dad993c5SAndreas Gohr        self::INAPPROPRIATE_MATCHING => 'Indicates that an attempt was made (e.g., in an assertion) to use a matching rule not defined for the attribute type concerned.',
180*dad993c5SAndreas Gohr        self::CONSTRAINT_VIOLATION => 'Indicates that the client supplied an attribute value that does not conform to the constraints placed upon it by the data model.',
181*dad993c5SAndreas Gohr        self::ATTRIBUTE_OR_VALUE_EXISTS => 'Indicates that the client supplied an attribute or value to be added to an entry, but the attribute or value already exists.',
182*dad993c5SAndreas Gohr        self::INVALID_ATTRIBUTE_SYNTAX => 'Indicates that a purported attribute value does not conform to the syntax of the attribute.',
183*dad993c5SAndreas Gohr        self::NO_SUCH_OBJECT => 'Indicates that the object does not exist in the DIT.',
184*dad993c5SAndreas Gohr        self::ALIAS_PROBLEM => 'Indicates that an alias problem has occurred.  For example, the code may used to indicate an alias has been dereferenced that names no object.',
185*dad993c5SAndreas Gohr        self::INVALID_DN_SYNTAX => 'Indicates that an LDAPDN or RelativeLDAPDN field (e.g., search base, target entry, ModifyDN newrdn, etc.) of a request does not conform to the required syntax or contains attribute values that do not conform to the syntax of the attribute\'s type.',
186*dad993c5SAndreas Gohr        self::ALIAS_DEREFERENCING_PROBLEM => 'Indicates that a problem occurred while dereferencing an alias.  Typically, an alias was encountered in a situation where it was not allowed or where access was denied.',
187*dad993c5SAndreas Gohr        self::INAPPROPRIATE_AUTHENTICATION => 'Indicates the server requires the client that had attempted to bind anonymously or without supplying credentials to provide some form of credentials.',
188*dad993c5SAndreas Gohr        self::INVALID_CREDENTIALS => 'Indicates that the provided credentials (e.g., the user\'s name and password) are invalid.',
189*dad993c5SAndreas Gohr        self::INSUFFICIENT_ACCESS_RIGHTS => 'Indicates that the client does not have sufficient access rights to perform the operation.',
190*dad993c5SAndreas Gohr        self::BUSY => 'Indicates that the server is too busy to service the operation.',
191*dad993c5SAndreas Gohr        self::UNAVAILABLE => 'Indicates that the server is shutting down or a subsystem necessary to complete the operation is offline.',
192*dad993c5SAndreas Gohr        self::UNWILLING_TO_PERFORM => 'Indicates that the server is unwilling to perform the operation.',
193*dad993c5SAndreas Gohr        self::LOOP_DETECT => 'Indicates that the server has detected an internal loop (e.g., while dereferencing aliases or chaining an operation).',
194*dad993c5SAndreas Gohr        self::NAMING_VIOLATION => 'Indicates that the entry\'s name violates naming restrictions.',
195*dad993c5SAndreas Gohr        self::OBJECT_CLASS_VIOLATION => ' Indicates that the entry violates object class restrictions.',
196*dad993c5SAndreas Gohr        self::NOT_ALLOWED_ON_NON_LEAF => 'Indicates that the operation is inappropriately acting upon a non-leaf entry.',
197*dad993c5SAndreas Gohr        self::NOT_ALLOWED_ON_RDN => 'Indicates that the operation is inappropriately attempting to remove a value that forms the entry\'s relative distinguished name.',
198*dad993c5SAndreas Gohr        self::ENTRY_ALREADY_EXISTS => 'Indicates that the request cannot be fulfilled (added, moved, or renamed) as the target entry already exists.',
199*dad993c5SAndreas Gohr        self::OBJECT_CLASS_MODS_PROHIBITED => 'Indicates that an attempt to modify the object class(es) of an entry\'s \'objectClass\' attribute is prohibited.',
200*dad993c5SAndreas Gohr        self::AFFECTS_MULTIPLE_DSAS => 'Indicates that the operation cannot be performed as it would affect multiple servers (DSAs).',
201*dad993c5SAndreas Gohr        self::OTHER => 'Indicates the server has encountered an internal error.',
202*dad993c5SAndreas Gohr        self::VIRTUAL_LIST_VIEW_ERROR => 'This error indicates that the search operation failed due to the inclusion of the VirtualListViewRequest control.',
203*dad993c5SAndreas Gohr        self::CANNOT_CANCEL => 'The cannotCancel resultCode is returned if the identified operation does not support cancelation or the cancel operation could not be performed.',
204*dad993c5SAndreas Gohr        self::TOO_LATE => 'Indicates that it is too late to cancel the outstanding operation.',
205*dad993c5SAndreas Gohr        self::NO_SUCH_OPERATION => 'The server has no knowledge of the operation requested for cancelation.',
206*dad993c5SAndreas Gohr    ];
2070b3fd2d3SAndreas Gohr}
208