diff --git a/core/modules/user/src/PrivateTempStore.php b/core/modules/user/src/PrivateTempStore.php
index 79be710..63bc5bc 100644
--- a/core/modules/user/src/PrivateTempStore.php
+++ b/core/modules/user/src/PrivateTempStore.php
@@ -32,7 +32,7 @@
  * you want to be able to share data between users or use it for locking, use
  * \Drupal\user\SharedTempStore.
  */
-class PrivateTempStore {
+class PrivateTempStore implements TempStoreInterface {
 
   /**
    * The key/value storage object used for this data.
@@ -80,8 +80,10 @@ class PrivateTempStore {
    *   of key/value pairs.
    * @param \Drupal\Core\Lock\LockBackendInterface $lockBackend
    *   The lock object used for this data.
-   * @param mixed $owner
-   *   The owner key to store along with the data (e.g. a user or session ID).
+   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
+   *   @todo.
+   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
+   *   @todo.
    * @param int $expire
    *   The time to live for items, in seconds.
    */
@@ -94,13 +96,7 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken
   }
 
   /**
-   * Retrieves a value from this PrivateTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function get($key) {
     $key = $this->createkey($key);
@@ -110,12 +106,14 @@ public function get($key) {
   }
 
   /**
-   * Stores a particular key/value pair in this PrivateTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
+   * {@inheritdoc}
+   */
+  public function getIfOwner($key) {
+    return $this->get($key);
+  }
+
+  /**
+   * {@inheritdoc}
    */
   public function set($key, $value) {
     $key = $this->createkey($key);
@@ -139,14 +137,14 @@ public function set($key, $value) {
   }
 
   /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
+   * {@inheritdoc}
+   */
+  public function setIfOwner($key, $value) {
+    $this->set($key, $value);
+  }
+
+  /**
+   * {@inheritdoc}
    */
   public function getMetadata($key) {
     $key = $this->createkey($key);
@@ -160,14 +158,7 @@ public function getMetadata($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
+   * {@inheritdoc}
    */
   public function delete($key) {
     $key = $this->createkey($key);
@@ -192,6 +183,13 @@ public function delete($key) {
   }
 
   /**
+   * {@inheritdoc}
+   */
+  public function deleteIfOwner($key) {
+    return $this->delete($key);
+  }
+
+  /**
    * Ensures that the key is unique for a user.
    *
    * @param string $key
@@ -213,4 +211,5 @@ protected function createkey($key) {
   protected function getOwner() {
     return $this->currentUser->id() ?: $this->requestStack->getCurrentRequest()->getSession()->getId();
   }
+
 }
diff --git a/core/modules/user/src/SharedTempStore.php b/core/modules/user/src/SharedTempStore.php
index 89c9725..706f5d2 100644
--- a/core/modules/user/src/SharedTempStore.php
+++ b/core/modules/user/src/SharedTempStore.php
@@ -41,7 +41,7 @@
  * If you want to be able to ensure that the data belongs to the current user,
  * use \Drupal\user\PrivateTempStore.
  */
-class SharedTempStore {
+class SharedTempStore implements TempStoreInterface {
 
   /**
    * The key/value storage object used for this data.
@@ -105,13 +105,7 @@ public function __construct(KeyValueStoreExpirableInterface $storage, LockBacken
   }
 
   /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function get($key) {
     if ($object = $this->storage->get($key)) {
@@ -120,18 +114,10 @@ public function get($key) {
   }
 
   /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * Only returns the value if the value is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
+   * {@inheritdoc}
    */
   public function getIfOwner($key) {
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
+    if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) {
       return $object->data;
     }
   }
@@ -149,7 +135,7 @@ public function getIfOwner($key) {
    */
   public function setIfNotExists($key, $value) {
     $value = (object) array(
-      'owner' => $this->owner,
+      'owner' => $this->getOwner(),
       'data' => $value,
       'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
     );
@@ -157,26 +143,14 @@ public function setIfNotExists($key, $value) {
   }
 
   /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * Only stores the given key/value pair if it does not exist yet or is owned
-   * by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already exists and is not owned
-   * by $this->user.
+   * {@inheritdoc}
    */
   public function setIfOwner($key, $value) {
     if ($this->setIfNotExists($key, $value)) {
       return TRUE;
     }
 
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
+    if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) {
       $this->set($key, $value);
       return TRUE;
     }
@@ -185,12 +159,7 @@ public function setIfOwner($key, $value) {
   }
 
   /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
+   * {@inheritdoc}
    */
   public function set($key, $value) {
     if (!$this->lockBackend->acquire($key)) {
@@ -204,7 +173,7 @@ public function set($key, $value) {
     }
 
     $value = (object) array(
-      'owner' => $this->owner,
+      'owner' => $this->getOwner(),
       'data' => $value,
       'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
     );
@@ -213,14 +182,7 @@ public function set($key, $value) {
   }
 
   /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
+   * {@inheritdoc}
    */
   public function getMetadata($key) {
     // Fetch the key/value pair and its metadata.
@@ -233,10 +195,7 @@ public function getMetadata($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
+   * {@inheritdoc}
    */
   public function delete($key) {
     if (!$this->lockBackend->acquire($key)) {
@@ -253,22 +212,13 @@ public function delete($key) {
   }
 
   /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * Only delete the given key if it is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
+   * {@inheritdoc}
    */
   public function deleteIfOwner($key) {
     if (!$object = $this->storage->get($key)) {
       return TRUE;
     }
-    elseif ($object->owner == $this->owner) {
+    elseif ($object->owner == $this->getOwner()) {
       $this->delete($key);
       return TRUE;
     }
@@ -276,4 +226,11 @@ public function deleteIfOwner($key) {
     return FALSE;
   }
 
+  /**
+   * {@inheritdoc}
+   */
+  protected function getOwner() {
+    return $this->owner;
+  }
+
 }
diff --git a/core/modules/user/src/TempStoreInterface.php b/core/modules/user/src/TempStoreInterface.php
new file mode 100644
index 0000000..995cb97
--- /dev/null
+++ b/core/modules/user/src/TempStoreInterface.php
@@ -0,0 +1,100 @@
+<?php
+
+/**
+ * @file
+ * Contains Drupal\user\TempStoreInterface.
+ */
+
+namespace Drupal\user;
+
+/**
+ * @todo.
+ */
+interface TempStoreInterface {
+
+  /**
+   * Retrieves a value from this TempStore for a given key.
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  public function get($key);
+
+  /**
+   * Retrieves a value from this TempStore for a given key.
+   *
+   * Only returns the value if the value is owned by $this->getOwner().
+   *
+   * @param string $key
+   *   The key of the data to retrieve.
+   *
+   * @return mixed
+   *   The data associated with the key, or NULL if the key does not exist.
+   */
+  public function getIfOwner($key);
+
+  /**
+   * Stores a particular key/value pair in this TempStore.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   */
+  public function set($key, $value);
+
+  /**
+   * Stores a particular key/value pair in this TempStore.
+   *
+   * Only stores the given key/value pair if it does not exist yet or is owned
+   * by $this->getOwner().
+   *
+   * @param string $key
+   *   The key of the data to store.
+   * @param mixed $value
+   *   The data to store.
+   *
+   * @return bool
+   *   TRUE if the data was set, or FALSE if it already exists and is not owned
+   *   by $this->user.
+   */
+  public function setIfOwner($key, $value);
+
+  /**
+   * Returns the metadata associated with a particular key/value pair.
+   *
+   * @param string $key
+   *   The key of the data to store.
+   *
+   * @return mixed
+   *   An object with the owner and updated time if the key has a value, or
+   *   NULL otherwise.
+   */
+  public function getMetadata($key);
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   */
+  public function delete($key);
+
+  /**
+   * Deletes data from the store for a given key and releases the lock on it.
+   *
+   * Only delete the given key if it is owned by $this->getOwner().
+   *
+   * @param string $key
+   *   The key of the data to delete.
+   *
+   * @return bool
+   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
+   *   is not owned by $this->getOwner().
+   */
+  public function deleteIfOwner($key);
+
+}
