Exemplo n.º 1
0
        public FidoStartedRegistration StartRegistration(FidoAppId appId)
        {
            var challengeBytes = _generateFidoChallenge.GenerateChallenge();
            var challenge      = WebSafeBase64Converter.ToBase64String(challengeBytes);

            return(new FidoStartedRegistration(appId, challenge));
        }
Exemplo n.º 2
0
        public FidoStartedAuthentication StartAuthentication(FidoAppId appId, FidoDeviceRegistration deviceRegistration)
        {
            if (appId == null)
            {
                throw new ArgumentNullException("appId");
            }
            if (deviceRegistration == null)
            {
                throw new ArgumentNullException("deviceRegistration");
            }

            var challenge = _generateFidoChallenge.GenerateChallenge();

            return(new FidoStartedAuthentication(appId,
                                                 WebSafeBase64Converter.ToBase64String(challenge),
                                                 deviceRegistration.KeyHandle));
        }