Skip to content

Commit

Permalink
Secure context inline (mdn#31302)
Browse files Browse the repository at this point in the history
* PaymentResponse

* PaymentRequest

* Geolocation

* GeolocationCoordinates

* GeolocationPosition

* GeolocationPositionError

* PaymentMethodChangeEvent

* MerchantValidationEvent

* PaymentRequestUpdateEvent

* StorageManager

* CredentialsContainer

* PasswordCredential

* PublicKeyCredential

* AuthenticatorAttestationResponse

* AuthenticatorAssertionResponse
  • Loading branch information
skyclouds2001 authored Dec 26, 2023
1 parent 7cc15ff commit 89c7b11
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 85 deletions.
8 changes: 4 additions & 4 deletions files/en-us/web/api/authenticatorassertionresponse/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ This interface inherits from {{domxref("AuthenticatorResponse")}}.

_Also inherits properties from its parent, {{domxref("AuthenticatorResponse")}}._

- {{domxref("AuthenticatorAssertionResponse.authenticatorData")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorAssertionResponse.authenticatorData")}} {{ReadOnlyInline}}
- : An {{jsxref("ArrayBuffer")}} containing information from the authenticator such as the Relying Party ID Hash (rpIdHash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.
- {{domxref("AuthenticatorResponse.clientDataJSON")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorResponse.clientDataJSON")}} {{ReadOnlyInline}}
- : Contains the JSON-compatible serialization of the data passed from the browser to the authenticator in order to authenticate with this credential — i.e., when {{domxref("CredentialsContainer.get()")}} is called with a `publicKey` option. This data contains some information from the options passed into the `get()` call, and some information controlled by the browser.
- {{domxref("AuthenticatorAssertionResponse.signature")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorAssertionResponse.signature")}} {{ReadOnlyInline}}
- : An assertion signature over {{domxref("AuthenticatorAssertionResponse.authenticatorData")}} and {{domxref("AuthenticatorResponse.clientDataJSON")}}. The assertion signature is created with the private key of the key pair that was created during the originating {{domxref("CredentialsContainer.create()","navigator.credentials.create()")}} call and verified using the public key of that same key pair.
- {{domxref("AuthenticatorAssertionResponse.userHandle")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorAssertionResponse.userHandle")}} {{ReadOnlyInline}}
- : An {{jsxref("ArrayBuffer")}} containing an opaque user identifier, specified as `user.id` in the options passed to the originating {{domxref("CredentialsContainer.create()","navigator.credentials.create()")}} call.

## Instance methods
Expand Down
12 changes: 6 additions & 6 deletions files/en-us/web/api/authenticatorattestationresponse/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ This interface inherits from {{domxref("AuthenticatorResponse")}}.

_Also inherits properties from its parent, {{domxref("AuthenticatorResponse")}}._

- {{domxref("AuthenticatorAttestationResponse.attestationObject")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorAttestationResponse.attestationObject")}} {{ReadOnlyInline}}

- : An {{jsxref("ArrayBuffer")}} containing authenticator data and an attestation statement for a new key pair generated by the authenticator.

- {{domxref("AuthenticatorResponse.clientDataJSON")}} {{securecontext_inline}} {{ReadOnlyInline}}
- {{domxref("AuthenticatorResponse.clientDataJSON")}} {{ReadOnlyInline}}
- : Inherited from {{domxref("AuthenticatorResponse")}}, this property contains the JSON-compatible serialization of the data passed from the browser to the authenticator in order to generate this credential — i.e., when {{domxref("CredentialsContainer.create()")}} is called with a `publicKey` option. This data contains some information from the options passed into the `create()` call, and some information controlled by the browser.

## Instance methods

- {{domxref("AuthenticatorAttestationResponse.getAuthenticatorData()")}} {{securecontext_inline}}
- {{domxref("AuthenticatorAttestationResponse.getAuthenticatorData()")}}
- : Returns an {{jsxref("ArrayBuffer")}} containing the authenticator data contained within the {{domxref("AuthenticatorAttestationResponse.attestationObject")}} property.
- {{domxref("AuthenticatorAttestationResponse.getPublicKey()")}} {{securecontext_inline}}
- {{domxref("AuthenticatorAttestationResponse.getPublicKey()")}}
- : Returns an {{jsxref("ArrayBuffer")}} containing the DER `SubjectPublicKeyInfo` of the new credential (see [Subject Public Key Info](https://www.rfc-editor.org/rfc/rfc5280#section-4.1.2.7)), or `null` if this is not available.
- {{domxref("AuthenticatorAttestationResponse.getPublicKeyAlgorithm()")}} {{securecontext_inline}}
- {{domxref("AuthenticatorAttestationResponse.getPublicKeyAlgorithm()")}}
- : Returns a number that is equal to a [COSE Algorithm Identifier](https://www.iana.org/assignments/cose/cose.xhtml#algorithms), representing the cryptographic algorithm used for the new credential.
- {{domxref("AuthenticatorAttestationResponse.getTransports()")}} {{securecontext_inline}}
- {{domxref("AuthenticatorAttestationResponse.getTransports()")}}
- : Returns an array of strings describing which transport methods (e.g., `usb`, `nfc`) are believed to be supported with the authenticator. The array may be empty if the information is not available.

## Examples
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/credentialscontainer/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ None.

## Instance methods

- {{domxref("CredentialsContainer.create()")}} {{securecontext_inline}}
- {{domxref("CredentialsContainer.create()")}}
- : Returns a {{jsxref("Promise")}} that resolves with a new {{domxref("Credential")}} instance based on the provided options, or `null` if no `Credential` object can be created. In exceptional circumstances, the {{jsxref("Promise")}} may reject.
- {{domxref("CredentialsContainer.get()")}} {{securecontext_inline}}
- {{domxref("CredentialsContainer.get()")}}
- : Returns a {{jsxref("Promise")}} that resolves with the {{domxref("Credential")}} instance that matches the provided parameters.
- {{domxref("CredentialsContainer.preventSilentAccess()")}} {{securecontext_inline}}
- {{domxref("CredentialsContainer.preventSilentAccess()")}}
- : Sets a flag that specifies whether automatic log in is allowed for future visits to the current origin, then returns an empty {{jsxref("Promise")}}. For example, you might call this, after a user signs out of a website to ensure that they aren't automatically signed in on the next site visit. Earlier versions of the spec called this method `requireUserMediation()`. See [Browser compatibility](#browser_compatibility) for support details.
- {{domxref("CredentialsContainer.store()")}} {{securecontext_inline}}
- {{domxref("CredentialsContainer.store()")}}
- : Stores a set of credentials for a user, inside a provided {{domxref("Credential")}} instance and returns that instance in a {{jsxref("Promise")}}.

## Examples
Expand Down
6 changes: 3 additions & 3 deletions files/en-us/web/api/geolocation/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ _The `Geolocation` interface neither implements, nor inherits any property._

_The `Geolocation` interface doesn't inherit any method._

- {{domxref("Geolocation.getCurrentPosition()")}} {{securecontext_inline}}
- {{domxref("Geolocation.getCurrentPosition()")}}
- : Determines the device's current location and gives back a {{domxref("GeolocationPosition")}} object with the data.
- {{domxref("Geolocation.watchPosition()")}} {{securecontext_inline}}
- {{domxref("Geolocation.watchPosition()")}}
- : Returns a `long` value representing the newly established callback function to be invoked whenever the device location changes.
- {{domxref("Geolocation.clearWatch()")}} {{securecontext_inline}}
- {{domxref("Geolocation.clearWatch()")}}
- : Removes the particular handler previously installed using `watchPosition()`.

## Specifications
Expand Down
14 changes: 7 additions & 7 deletions files/en-us/web/api/geolocationcoordinates/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@ The **`GeolocationCoordinates`** interface represents the position and altitude

_The `GeolocationCoordinates` interface doesn't inherit any properties._

- {{domxref("GeolocationCoordinates.latitude")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.latitude")}} {{ReadOnlyInline}}
- : Returns a `double` representing the position's latitude in decimal degrees.
- {{domxref("GeolocationCoordinates.longitude")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.longitude")}} {{ReadOnlyInline}}
- : Returns a `double` representing the position's longitude in decimal degrees.
- {{domxref("GeolocationCoordinates.altitude")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.altitude")}} {{ReadOnlyInline}}
- : Returns a `double` representing the position's altitude in meters, relative to nominal sea level. This value can be `null` if the implementation cannot provide the data.
- {{domxref("GeolocationCoordinates.accuracy")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.accuracy")}} {{ReadOnlyInline}}
- : Returns a `double` representing the accuracy of the `latitude` and `longitude` properties, expressed in meters.
- {{domxref("GeolocationCoordinates.altitudeAccuracy")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.altitudeAccuracy")}} {{ReadOnlyInline}}
- : Returns a `double` representing the accuracy of the `altitude` expressed in meters. This value can be `null` if the implementation cannot provide the data.
- {{domxref("GeolocationCoordinates.heading")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.heading")}} {{ReadOnlyInline}}
- : Returns a `double` representing the direction towards which the device is facing. This value, specified in degrees, indicates how far off from heading true north the device is. `0` degrees represents true north, and the direction is determined clockwise (which means that east is `90` degrees and west is `270` degrees). If `speed` is `0`, `heading` is [`NaN`](/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN). If the device is unable to provide `heading` information, this value is `null`.
- {{domxref("GeolocationCoordinates.speed")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationCoordinates.speed")}} {{ReadOnlyInline}}
- : Returns a `double` representing the velocity of the device in meters per second. This value can be `null`.

## Instance methods
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/geolocationposition/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ The **`GeolocationPosition`** interface represents the position of the concerned

_The `GeolocationPosition` interface doesn't inherit any properties._

- {{domxref("GeolocationPosition.coords")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationPosition.coords")}} {{ReadOnlyInline}}
- : Returns a {{domxref("GeolocationCoordinates")}} object defining the current location.
- {{domxref("GeolocationPosition.timestamp")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationPosition.timestamp")}} {{ReadOnlyInline}}
- : Returns a timestamp, given as [Unix time](/en-US/docs/Glossary/Unix_time) in milliseconds, representing the time at which the location was retrieved.

## Instance methods
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/geolocationpositionerror/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The **`GeolocationPositionError`** interface represents the reason of an error o

_The `GeolocationPositionError` interface doesn't inherit any property._

- {{domxref("GeolocationPositionError.code")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationPositionError.code")}} {{ReadOnlyInline}}

- : Returns an `unsigned short` representing the error code. The following values are possible:

Expand All @@ -23,7 +23,7 @@ _The `GeolocationPositionError` interface doesn't inherit any property._
| `2` | `POSITION_UNAVAILABLE` | The acquisition of the geolocation failed because at least one internal source of position returned an internal error. |
| `3` | `TIMEOUT` | The time allowed to acquire the geolocation was reached before the information was obtained. |

- {{domxref("GeolocationPositionError.message")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("GeolocationPositionError.message")}} {{ReadOnlyInline}}
- : Returns a human-readable string describing the details of the error. Specifications note that this is primarily intended for debugging use and not to be shown directly in a user interface.

## Instance methods
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/merchantvalidationevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,19 @@ Learn more about [merchant validation](/en-US/docs/Web/API/Payment_Request_API/C

## Constructor

- {{domxref("MerchantValidationEvent.MerchantValidationEvent()","MerchantValidationEvent()")}} {{SecureContext_Inline}} {{Deprecated_Inline}}
- {{domxref("MerchantValidationEvent.MerchantValidationEvent()","MerchantValidationEvent()")}} {{Deprecated_Inline}}
- : Creates a new `MerchantValidationEvent` object describing a {{domxref("PaymentRequest.merchantvalidation_event", "merchantvalidation")}} event that will be sent to the payment handler to request that it validate the merchant.

## Instance properties

- {{domxref("MerchantValidationEvent.methodName")}} {{SecureContext_Inline}} {{Deprecated_Inline}}
- {{domxref("MerchantValidationEvent.methodName")}} {{Deprecated_Inline}}
- : A string providing a unique payment method identifier for the payment handler that's requiring validation. This may be either one of the standard payment method identifier strings or a URL that both identifies and handles requests for the payment handler, such as `https://apple.com/apple-pay`.
- {{domxref("MerchantValidationEvent.validationURL")}} {{SecureContext_Inline}} {{Deprecated_Inline}}
- {{domxref("MerchantValidationEvent.validationURL")}} {{Deprecated_Inline}}
- : A string specifying a URL from which the site or app can fetch payment handler specific validation information. Once this data is retrieved, the data (or a promise resolving to the validation data) should be passed into {{domxref("MerchantValidationEvent.complete", "complete()")}} to validate that the payment request is coming from an authorized merchant.

## Instance methods

- {{domxref("MerchantValidationEvent.complete()")}} {{SecureContext_Inline}} {{Deprecated_Inline}}
- {{domxref("MerchantValidationEvent.complete()")}} {{Deprecated_Inline}}
- : Pass the data retrieved from the URL specified by {{domxref("MerchantValidationEvent.validationURL", "validationURL")}} into `complete()` to complete the validation process for the {{domxref("PaymentRequest")}}.

## Browser compatibility
Expand Down
8 changes: 4 additions & 4 deletions files/en-us/web/api/passwordcredential/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ The interface of the [Credential Management API](/en-US/docs/Web/API/Credential_

## Constructor

- {{domxref("PasswordCredential.PasswordCredential()","PasswordCredential()")}} {{securecontext_inline}} {{Experimental_Inline}}
- {{domxref("PasswordCredential.PasswordCredential()","PasswordCredential()")}} {{Experimental_Inline}}
- : Creates a new `PasswordCredential` object.

## Instance properties

_Inherits properties from its ancestor, {{domxref("Credential")}}._

- {{domxref("PasswordCredential.iconURL")}} {{ReadOnlyInline}} {{securecontext_inline}} {{Experimental_Inline}}
- {{domxref("PasswordCredential.iconURL")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string containing a URL pointing to an image for an icon. This image is intended for display in a credential chooser. The URL must be accessible without authentication.
- {{domxref("PasswordCredential.name")}} {{ReadOnlyInline}} {{securecontext_inline}} {{Experimental_Inline}}
- {{domxref("PasswordCredential.name")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A human-readable string that provides public name for display in a credential chooser.
- {{domxref("PasswordCredential.password")}} {{ReadOnlyInline}} {{securecontext_inline}} {{Experimental_Inline}}
- {{domxref("PasswordCredential.password")}} {{ReadOnlyInline}} {{Experimental_Inline}}
- : A string containing the password of the credential.

### Event handlers
Expand Down
4 changes: 2 additions & 2 deletions files/en-us/web/api/paymentmethodchangeevent/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ The **`PaymentMethodChangeEvent`** interface of the [Payment Request API](/en-US

_In addition to the properties below, this interface includes properties inherited from {{domxref("PaymentRequestUpdateEvent")}}._

- {{domxref("PaymentMethodChangeEvent.methodDetails", "methodDetails")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("PaymentMethodChangeEvent.methodDetails", "methodDetails")}} {{ReadOnlyInline}}
- : An object containing payment method-specific data useful when handling a payment method change. If no such information is available, this value is `null`.
- {{domxref("PaymentMethodChangeEvent.methodName", "methodName")}} {{ReadOnlyInline}} {{securecontext_inline}}
- {{domxref("PaymentMethodChangeEvent.methodName", "methodName")}} {{ReadOnlyInline}}
- : A string containing the payment method identifier, a string which uniquely identifies a particular payment method. This identifier is usually a URL used during the payment process, but may be a standardized non-URL string as well, such as `basic-card`. The default value is the empty string, `""`.

## Instance methods
Expand Down
Loading

0 comments on commit 89c7b11

Please sign in to comment.