normalize api urls
This commit is contained in:
		
							parent
							
								
									ac47b7314d
								
							
						
					
					
						commit
						45f8f640c8
					
				| @ -616,7 +616,7 @@ | |||||||
|         return OAUTH3._discoverHelper(providerUri, opts).then(function (directives) { |         return OAUTH3._discoverHelper(providerUri, opts).then(function (directives) { | ||||||
|           directives.azp = directives.azp || OAUTH3.url.normalize(providerUri); |           directives.azp = directives.azp || OAUTH3.url.normalize(providerUri); | ||||||
|           directives.issuer = directives.issuer || OAUTH3.url.normalize(providerUri); |           directives.issuer = directives.issuer || OAUTH3.url.normalize(providerUri); | ||||||
|           directives.api = (directives.api||':hostname').replace(/:hostname/, directives.issuer || OAUTH3.url.normalize(providerUri)); |           directives.api = OAUTH3.url.normalize((directives.api||':hostname').replace(/:hostname/, OAUTH3.uri.normalize(directives.issuer) || OAUTH3.uri.normalize(providerUri))); | ||||||
|           // OAUTH3.PromiseA.resolve() is taken care of because this is wrapped
 |           // OAUTH3.PromiseA.resolve() is taken care of because this is wrapped
 | ||||||
|           return OAUTH3.hooks.directives.set(providerUri, directives); |           return OAUTH3.hooks.directives.set(providerUri, directives); | ||||||
|         }); |         }); | ||||||
| @ -1087,8 +1087,8 @@ | |||||||
|             if (!me._providerUri) { |             if (!me._providerUri) { | ||||||
|               throw new Error("'providerUri' was not supplied"); |               throw new Error("'providerUri' was not supplied"); | ||||||
|             } |             } | ||||||
|             opts.session.provider_uri = me._providerUri |             opts.session.provider_uri = me._providerUri; | ||||||
|             opts.session.client_uri = me._clientUri |             opts.session.client_uri = me._clientUri; | ||||||
|             me.session(opts.session, opts.sessionId); |             me.session(opts.session, opts.sessionId); | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user