How to use the sasl._scram_hmac function in sasl

To help you get started, we’ve selected a few sasl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github dwd / Suelta / sasl.py View on Github external
return self.process_two(chatter)
			elif self.step == 2:
				return self.process_three(chatter)
		
		def okay( self ):
			return self.rspauth
		
		def prep( self ):
			if 'password' in self.vals:
				del self.vals['password']
		
		def getuser( self ):
			return self.vals['username']
			
	register_mech('SCRAM-', 60, _scram_hmac)
	register_mech('SCRAM-', 70, _scram_hmac, '-PLUS')

except ImportError:
	pass

class _anonymous(sasl.saslmech):
	def __init__( self, sasl, mechname ):
		sasl.saslmech.__init__( self, sasl, mechname, 0 )

	def getvals( self ):
		return {}

	def process( self, chatter ):
		return "Anonymous, Suelta"

	def okay( self ):
		return True
github dwd / Suelta / sasl.py View on Github external
elif self.step == 1:
				return self.process_two(chatter)
			elif self.step == 2:
				return self.process_three(chatter)
		
		def okay( self ):
			return self.rspauth
		
		def prep( self ):
			if 'password' in self.vals:
				del self.vals['password']
		
		def getuser( self ):
			return self.vals['username']
			
	register_mech('SCRAM-', 60, _scram_hmac)
	register_mech('SCRAM-', 70, _scram_hmac, '-PLUS')

except ImportError:
	pass

class _anonymous(sasl.saslmech):
	def __init__( self, sasl, mechname ):
		sasl.saslmech.__init__( self, sasl, mechname, 0 )

	def getvals( self ):
		return {}

	def process( self, chatter ):
		return "Anonymous, Suelta"

	def okay( self ):