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
Use Postman or something similar to send the above and you will get back this:
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"|a8a2c5a-4e9cfc5e41a08a61.","errors":{"$":["The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."],"setGlobally":["The value 'authenticate' is not valid."],"providerType":["The value 'avatar' is not valid."]}}
setGlobally and providerType are optional params for the authenticate method.
/// <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);
}
NOTE: IT LOOKS LIKE THIS IS ALSO AN ISSUE FOR ALL METHODS ON THE WEB API SO SOMETHING DEFINTLEY GOING ON WITH THE DEPLOYMENT? PLEASE FIX ASAP! THANK YOU. It works locally fine so I can't work out what is going on?
This may also be related to another issue that started occurring out of the blue after no code had been changed:
dellams
changed the title
Error calling authenticate method on OASIS WEB API
Error calling authenticate/all method(s) on OASIS WEB API
Feb 18, 2021
dellams
changed the title
Error calling authenticate/all method(s) on OASIS WEB API
Error calling authenticate/all method(s) on LIVE OASIS WEB API
Feb 18, 2021
dellams
changed the title
Error calling authenticate/all method(s) on LIVE OASIS WEB API
URGENT: Error calling authenticate/all method(s) on LIVE OASIS WEB API
Feb 18, 2021
URI: http://oasisplatform.world/api/avatar/authenticate
Post Body Data:
{
"email": "davidellams@hotmail.com",
"password": "my-super-secret-password"
}
Use Postman or something similar to send the above and you will get back this:
{"type":"https://tools.ietf.org/html/rfc7231#section-6.5.1","title":"One or more validation errors occurred.","status":400,"traceId":"|a8a2c5a-4e9cfc5e41a08a61.","errors":{"$":["The input does not contain any JSON tokens. Expected the input to start with a valid JSON token, when isFinalBlock is true. Path: $ | LineNumber: 0 | BytePositionInLine: 0."],"setGlobally":["The value 'authenticate' is not valid."],"providerType":["The value 'avatar' is not valid."]}}
setGlobally and providerType are optional params for the authenticate method.
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
NOTE: IT LOOKS LIKE THIS IS ALSO AN ISSUE FOR ALL METHODS ON THE WEB API SO SOMETHING DEFINTLEY GOING ON WITH THE DEPLOYMENT? PLEASE FIX ASAP! THANK YOU. It works locally fine so I can't work out what is going on?
This may also be related to another issue that started occurring out of the blue after no code had been changed:
#15
Any help would be really appreciated thanks. :)
The text was updated successfully, but these errors were encountered: