1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * https://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 * 19 */ 20 package org.apache.directory.ldap.client.api; 21 22 import org.apache.directory.api.ldap.model.constants.SaslQoP; 23 import org.apache.directory.api.ldap.model.constants.SaslSecurityStrength; 24 import org.apache.directory.api.ldap.model.message.Control; 25 26 /** 27 * Holds the data required to complete the SASL operation 28 * 29 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 30 */ 31 public interface SaslRequest 32 { 33 /** 34 * Gets the authorization ID. 35 * 36 * @return the authorization ID 37 */ 38 String getAuthorizationId(); 39 40 41 /** 42 * Gets the controls. 43 * 44 * @return the controls 45 */ 46 Control[] getControls(); 47 48 49 /** 50 * Gets the crendentials 51 * 52 * @return the credentials 53 */ 54 byte[] getCredentials(); 55 56 57 /** 58 * Gets the quality of protection. 59 * 60 * @return the quality of protection 61 */ 62 SaslQoP getQualityOfProtection(); 63 64 65 /** 66 * Gets realm name. 67 * 68 * @return the realm name 69 */ 70 String getRealmName(); 71 72 73 /** 74 * Gets the SASL mechanism. 75 * 76 * @return the SASL mechanism 77 */ 78 String getSaslMechanism(); 79 80 81 /** 82 * Gets the security strength. 83 * 84 * @return the security strength 85 */ 86 SaslSecurityStrength getSecurityStrength(); 87 88 89 /** 90 * Gets the username. 91 * 92 * @return the username 93 */ 94 String getUsername(); 95 96 97 /** 98 * Indicates if mutual authentication is required. 99 * 100 * @return the flag indicating if mutual authentication is required 101 */ 102 boolean isMutualAuthentication(); 103 }