001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * http://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.ldap.client.api; 021 022import org.apache.directory.api.ldap.model.constants.SaslQoP; 023import org.apache.directory.api.ldap.model.constants.SaslSecurityStrength; 024import org.apache.directory.api.ldap.model.message.Control; 025 026/** 027 * Holds the data required to complete the SASL operation 028 * 029 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 030 */ 031public interface SaslRequest 032{ 033 /** 034 * Gets the authorization ID. 035 * 036 * @return the authorization ID 037 */ 038 String getAuthorizationId(); 039 040 041 /** 042 * Gets the controls. 043 * 044 * @return the controls 045 */ 046 Control[] getControls(); 047 048 049 /** 050 * Gets the crendentials 051 * 052 * @return the credentials 053 */ 054 byte[] getCredentials(); 055 056 057 /** 058 * Gets the quality of protection. 059 * 060 * @return the quality of protection 061 */ 062 SaslQoP getQualityOfProtection(); 063 064 065 /** 066 * Gets realm name. 067 * 068 * @return the realm name 069 */ 070 String getRealmName(); 071 072 073 /** 074 * Gets the SASL mechanism. 075 * 076 * @return the SASL mechanism 077 */ 078 String getSaslMechanism(); 079 080 081 /** 082 * Gets the security strength. 083 * 084 * @return the security strength 085 */ 086 SaslSecurityStrength getSecurityStrength(); 087 088 089 /** 090 * Gets the username. 091 * 092 * @return the username 093 */ 094 String getUsername(); 095 096 097 /** 098 * Indicates if mutual authentication is required. 099 * 100 * @return the flag indicating if mutual authentication is required 101 */ 102 boolean isMutualAuthentication(); 103}