Add SASL PLAIN authentication method
- this method isn't as deprecated as IMAP LOGIN; - it allows to keep hashed passwords on the server side; - it has the ability to specify that the remote identity is different from authenticating username, so it even can be useful in some cases (e.g., migrated mailboxes); configuration variable "remote_identity" was introduced to leverage this functionality. From: Andreas Mack <andreas.mack@konsec.com> Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
This commit is contained in:
		
				
					committed by
					
						
						Eygene Ryabinkin
					
				
			
			
				
	
			
			
			
						parent
						
							7d313f49dc
						
					
				
				
					commit
					acaa96291d
				
			@@ -115,6 +115,18 @@ class IMAPRepository(BaseRepository):
 | 
			
		||||
                                   "'%s' specified." % self,
 | 
			
		||||
                               OfflineImapError.ERROR.REPO)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def get_remote_identity(self):
 | 
			
		||||
        """
 | 
			
		||||
        Remote identity is used for certain SASL mechanisms
 | 
			
		||||
        (currently -- PLAIN) to inform server about the ID
 | 
			
		||||
        we want to authorize as instead of our login name.
 | 
			
		||||
 | 
			
		||||
        """
 | 
			
		||||
 | 
			
		||||
        return self.getconf('remote_identity', default=None)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
    def getuser(self):
 | 
			
		||||
        user = None
 | 
			
		||||
        localeval = self.localeval
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user