 Sebastian Wehrmann
					
					7 years ago
						Sebastian Wehrmann
					
					7 years ago
					
				 
				
			 
		 
		
			
				
				  
				  No known key found for this signature in database
				  
				  	
						GPG Key ID: 8BC01ED0CDC923F1
				  	
				  
				
			
		
		
		
	
		
			
				 2 changed files with 
6 additions and 
3 deletions
			 
			
		 
		
			
				- 
					
					
					 
					keycloak/keycloak_openid.py
				
- 
					
					
					 
					keycloak/urls_patterns.py
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -30,6 +30,7 @@ from .connection import ConnectionManager | 
			
		
	
		
			
				
					|  |  |  | from .exceptions import raise_error_from_response, KeycloakGetError, \ | 
			
		
	
		
			
				
					|  |  |  |     KeycloakRPTNotFound, KeycloakAuthorizationConfigError, KeycloakInvalidTokenError | 
			
		
	
		
			
				
					|  |  |  | from .urls_patterns import ( | 
			
		
	
		
			
				
					|  |  |  |     URL_AUTH, | 
			
		
	
		
			
				
					|  |  |  |     URL_TOKEN, | 
			
		
	
		
			
				
					|  |  |  |     URL_USERINFO, | 
			
		
	
		
			
				
					|  |  |  |     URL_WELL_KNOWN, | 
			
		
	
	
		
			
				
					|  |  | @ -156,9 +157,10 @@ class KeycloakOpenID: | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |         :return: | 
			
		
	
		
			
				
					|  |  |  |         """ | 
			
		
	
		
			
				
					|  |  |  |         return (self.well_know()['authorization_endpoint'] + | 
			
		
	
		
			
				
					|  |  |  |                 '?client_id=' + self.client_id + | 
			
		
	
		
			
				
					|  |  |  |                 '&response_type=code&redirect_uri=' + redirect_uri) | 
			
		
	
		
			
				
					|  |  |  |         params_path = {"authorization-endpoint": self.well_know()['authorization_endpoint'], | 
			
		
	
		
			
				
					|  |  |  |                        "client-id": self.client_id, | 
			
		
	
		
			
				
					|  |  |  |                        "redirect-uri": redirect_uri} | 
			
		
	
		
			
				
					|  |  |  |         return URL_AUTH.format(**params_path) | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  |     def token(self, username="", password="", grant_type=["password"], code="", redirect_uri=""): | 
			
		
	
		
			
				
					|  |  |  |         """ | 
			
		
	
	
		
			
				
					|  |  | 
 | 
			
		
	
										
									
								
							
						 
					 
				 
			
		
			
				
					
					
						
							
								
									
										
											
	
		
			
				
					|  |  | @ -29,6 +29,7 @@ URL_LOGOUT = "realms/{realm-name}/protocol/openid-connect/logout" | 
			
		
	
		
			
				
					|  |  |  | URL_CERTS = "realms/{realm-name}/protocol/openid-connect/certs" | 
			
		
	
		
			
				
					|  |  |  | URL_INTROSPECT = "realms/{realm-name}/protocol/openid-connect/token/introspect" | 
			
		
	
		
			
				
					|  |  |  | URL_ENTITLEMENT = "realms/{realm-name}/authz/entitlement/{resource-server-id}" | 
			
		
	
		
			
				
					|  |  |  | URL_AUTH = "{authorization-endpoint}?client_id={client-id}&response_type=code&redirect_uri={redirect-uri}" | 
			
		
	
		
			
				
					|  |  |  | 
 | 
			
		
	
		
			
				
					|  |  |  | # ADMIN URLS | 
			
		
	
		
			
				
					|  |  |  | URL_ADMIN_USERS = "admin/realms/{realm-name}/users" | 
			
		
	
	
		
			
				
					|  |  | 
 |