forked from Floorp-Projects/Floorp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1813982 - XPCOM interface to authenticator-rs. r=keeler,geckoview…
…-reviewers,m_kato Differential Revision: https://phabricator.services.mozilla.com/D171269
- Loading branch information
Showing
38 changed files
with
3,783 additions
and
1,533 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* 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/. */ | ||
|
||
#include "AuthrsTransport.h" | ||
#include "nsIWebAuthnController.h" | ||
#include "nsCOMPtr.h" | ||
|
||
namespace { | ||
extern "C" { | ||
|
||
// Implemented in Rust | ||
nsresult authrs_transport_constructor(nsIWebAuthnTransport** result); | ||
|
||
} // extern "C" | ||
} // namespace | ||
|
||
namespace mozilla::dom { | ||
|
||
already_AddRefed<nsIWebAuthnTransport> NewAuthrsTransport() { | ||
nsCOMPtr<nsIWebAuthnTransport> transport; | ||
nsresult rv = authrs_transport_constructor(getter_AddRefs(transport)); | ||
if (NS_WARN_IF(NS_FAILED(rv))) { | ||
return nullptr; | ||
} | ||
return transport.forget(); | ||
} | ||
|
||
} // namespace mozilla::dom |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* 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 DOM_WEBAUTHN_AUTHRS_BRIDGE_H_ | ||
#define DOM_WEBAUTHN_AUTHRS_BRIDGE_H_ | ||
|
||
#include "mozilla/AlreadyAddRefed.h" | ||
#include "nsIWebAuthnController.h" | ||
|
||
namespace mozilla::dom { | ||
|
||
already_AddRefed<nsIWebAuthnTransport> NewAuthrsTransport(); | ||
|
||
} // namespace mozilla::dom | ||
|
||
#endif // DOM_WEBAUTHN_AUTHRS_BRIDGE_H_ |
Oops, something went wrong.