You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the WEB API there is a overload for each method call allowing the providertype and setglobally params to be passed in overriding the default provider.
to override the default provider with 1st param, in this case it is the MongoDBOASIS Provider. The 2nd param is the setGlobally flag, if true then it will set this provider as the new default provider for future calls, or false for it to only override on this one call.
THIS USE TO WORK FINE AND NOW FOR SOME REASON IT HAS STOPPED WORKING!
Nothing has been changed or updated so very odd for it all of a sudden to stop working?! I do not have time to fix this, it really makes no sense to me and needs fixing ASAP please!
/// <summary>
/// Authenticate and log in using the given avatar credentials. Pass in the provider you wish to use. Set the setglobally flag to false for this provider to be used only for this request or true for it to be used for all future requests too.
/// </summary>
/// <param name="model"></param>
/// <param name="providerType"></param>
/// <param name="setGlobally"></param>
/// <returns></returns>
[HttpPost("authenticate/{providerType}/{setGlobally}")]
public ActionResult<AuthenticateResponse> Authenticate(AuthenticateRequest model, ProviderType providerType = ProviderType.Default, bool setGlobally = false)
{
GetAndActivateProvider(providerType, setGlobally);
return Authenticate(model);
AuthenticateResponse response = _avatarService.Authenticate(model, ipAddress());
if (!response.IsError && response.Avatar != null)
setTokenCookie(response.Avatar.RefreshToken);
return Ok(response);
}
/// <summary>
/// Authenticate and log in using the given avatar credentials.
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
[HttpPost("authenticate")]
public ActionResult<AuthenticateResponse> Authenticate(AuthenticateRequest model)
{
AuthenticateResponse response = _avatarService.Authenticate(model, ipAddress());
if (!response.IsError && response.Avatar != null)
setTokenCookie(response.Avatar.RefreshToken);
return Ok(response);
}
dellams
changed the title
Web API Bug -> Overloaded methods no longer being found!
URGENT: Web API Bug -> Overloaded methods no longer being found!
Feb 18, 2021
On the WEB API there is a overload for each method call allowing the providertype and setglobally params to be passed in overriding the default provider.
For example using Postman you could call:
http://localhost:5000/api/avatar/authenticate to auth with the default provider
Body text: (POST)
{
"email": "davidellams@hotmail.com",
"password": "my-super-secret-password"
}
You could then call:
http://localhost:5000/api/avatar/authenticate/MongoDBOASIS/false
to override the default provider with 1st param, in this case it is the MongoDBOASIS Provider. The 2nd param is the setGlobally flag, if true then it will set this provider as the new default provider for future calls, or false for it to only override on this one call.
THIS USE TO WORK FINE AND NOW FOR SOME REASON IT HAS STOPPED WORKING!
Nothing has been changed or updated so very odd for it all of a sudden to stop working?! I do not have time to fix this, it really makes no sense to me and needs fixing ASAP please!
Full code here:
https://github.com/NextGenSoftwareUK/Our-World-OASIS-API-HoloNET-HoloUnity-And-.NET-HDK/blob/master/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/AvatarController.cs
This may also be related to #14 in someway? But I feel they are separate issues and both need fixing ASAP! Thank you.
THANK YOU.
The text was updated successfully, but these errors were encountered: