Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  WebAuthnArgs.h   Sprache: C

 
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set ts=2 et sw=2 tw=80: */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */


#ifndef mozilla_dom_WebAuthnArgs_H_
#define mozilla_dom_WebAuthnArgs_H_

#include "mozilla/dom/WebAuthnTransactionChild.h"
#include "mozilla/ipc/BackgroundParent.h"
#include "nsIWebAuthnArgs.h"

namespace mozilla::dom {

class WebAuthnRegisterArgs final : public nsIWebAuthnRegisterArgs {
 public:
  NS_DECL_THREADSAFE_ISUPPORTS
  NS_DECL_NSIWEBAUTHNREGISTERARGS

  explicit WebAuthnRegisterArgs(const WebAuthnMakeCredentialInfo& aInfo)
      : mInfo(aInfo),
        mCredProps(false),
        mHmacCreateSecret(false),
        mMinPinLength(false),
        mPrf(false) {
    for (const WebAuthnExtension& ext : mInfo.Extensions()) {
      switch (ext.type()) {
        case WebAuthnExtension::TWebAuthnExtensionCredProps:
          mCredProps = ext.get_WebAuthnExtensionCredProps().credProps();
          break;
        case WebAuthnExtension::TWebAuthnExtensionHmacSecret:
          mHmacCreateSecret =
              ext.get_WebAuthnExtensionHmacSecret().hmacCreateSecret();
          break;
        case WebAuthnExtension::TWebAuthnExtensionMinPinLength:
          mMinPinLength =
              ext.get_WebAuthnExtensionMinPinLength().minPinLength();
          break;
        case WebAuthnExtension::TWebAuthnExtensionAppId:
          break;
        case WebAuthnExtension::TWebAuthnExtensionPrf:
          mPrf = true;
          break;
        case WebAuthnExtension::T__None:
          break;
      }
    }
  }

 private:
  ~WebAuthnRegisterArgs() = default;

  const WebAuthnMakeCredentialInfo mInfo;

  // Flags to indicate whether an extension is being requested.
  bool mCredProps;
  bool mHmacCreateSecret;
  bool mMinPinLength;
  bool mPrf;
};

class WebAuthnSignArgs final : public nsIWebAuthnSignArgs {
 public:
  NS_DECL_THREADSAFE_ISUPPORTS
  NS_DECL_NSIWEBAUTHNSIGNARGS

  explicit WebAuthnSignArgs(const WebAuthnGetAssertionInfo& aInfo)
      : mInfo(aInfo), mPrf(false) {
    for (const WebAuthnExtension& ext : mInfo.Extensions()) {
      switch (ext.type()) {
        case WebAuthnExtension::TWebAuthnExtensionAppId:
          mAppId = Some(ext.get_WebAuthnExtensionAppId().appIdentifier());
          break;
        case WebAuthnExtension::TWebAuthnExtensionCredProps:
          break;
        case WebAuthnExtension::TWebAuthnExtensionHmacSecret:
          break;
        case WebAuthnExtension::TWebAuthnExtensionMinPinLength:
          break;
        case WebAuthnExtension::TWebAuthnExtensionPrf:
          mPrf = ext.get_WebAuthnExtensionPrf().eval().isSome() ||
                 ext.get_WebAuthnExtensionPrf().evalByCredentialMaybe();
          break;
        case WebAuthnExtension::T__None:
          break;
      }
    }
  }

 private:
  ~WebAuthnSignArgs() = default;

  const WebAuthnGetAssertionInfo mInfo;
  Maybe<nsString> mAppId;
  bool mPrf;
};

}  // namespace mozilla::dom

#endif  // mozilla_dom_WebAuthnArgs_H_

Messung V0.5
C=95 H=92 G=93

¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge