public async Task <GenerateTokenResponseModel> Generate(GenerateTokenRequestModel model) { var k = await _privateKeyStore.GetAsync(); var K = await _publicKeyStore.GetAsync(); var P = _ecParameters.Curve.DecodePoint(Hex.Decode(model.PAsHex)); var token = _tokenGenerator.GenerateToken(k, K.Q, _ecParameters, P); var Q = token.Q; var c = token.c; var z = token.z; return(new GenerateTokenResponseModel(Q, c, z)); }
public IActionResult DummyCreateTokenForSwagger([FromForm] GenerateTokenRequestModel requestModel) { return(Ok()); }