Fallback to original implementation of plain auth_mechanism if socket is not provided
(cherry picked from commit 3bcdc0f359)
			
			
This commit is contained in:
		
							parent
							
								
									007ee6b277
								
							
						
					
					
						commit
						1e1b7161c3
					
				|  | @ -40,8 +40,17 @@ handle_response(Response, #state{socket = Socket}) -> | ||||||
|             rabbit_access_control:check_user_login(User, AuthProps); |             rabbit_access_control:check_user_login(User, AuthProps); | ||||||
|         error -> |         error -> | ||||||
|             {protocol_error, "response ~tp invalid", [Response]} |             {protocol_error, "response ~tp invalid", [Response]} | ||||||
|  |     end; | ||||||
|  | 
 | ||||||
|  | handle_response(Response, _State) -> | ||||||
|  |     case extract_user_pass(Response) of | ||||||
|  |         {ok, User, Pass} -> | ||||||
|  |             rabbit_access_control:check_user_pass_login(User, Pass); | ||||||
|  |         error -> | ||||||
|  |             {protocol_error, "response ~tp invalid", [Response]} | ||||||
|     end. |     end. | ||||||
| 
 | 
 | ||||||
|  | 
 | ||||||
| build_auth_props(Pass, Socket) -> | build_auth_props(Pass, Socket) -> | ||||||
|     [{password, Pass}, {sockOrAddr, Socket}]. |     [{password, Pass}, {sockOrAddr, Socket}]. | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue