Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [8.4.0]

- Adds support for bulk query APIs for usermetadata and TOTP

## [8.3.0]

- Adds SAML support
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id 'java-library'
}

version = "8.3.0"
version = "8.4.0"

repositories {
mavenCentral()
Expand Down
15 changes: 0 additions & 15 deletions implementationDependencies.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,5 @@
{
"_comment": "Contains list of implementation dependencies URL for this project. This is a generated file, don't modify the contents by hand.",
"list": [
{
"jar":"https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.13.1/gson-2.13.1.jar",
"name":"gson 2.13.1",
"src":"https://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.13.1/gson-2.13.1-sources.jar"
},
{
"jar":"https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.38.0/error_prone_annotations-2.38.0.jar",
"name":"error_prone_annotations 2.38.0",
"src":"https://repo.maven.apache.org/maven2/com/google/errorprone/error_prone_annotations/2.38.0/error_prone_annotations-2.38.0-sources.jar"
},
{
"jar":"https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2.jar",
"name":"jsr305 3.0.2",
"src":"https://repo.maven.apache.org/maven2/com/google/code/findbugs/jsr305/3.0.2/jsr305-3.0.2-sources.jar"
}
]
}
11 changes: 11 additions & 0 deletions src/main/java/io/supertokens/pluginInterface/totp/TOTPStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@
import io.supertokens.pluginInterface.totp.exception.DeviceAlreadyExistsException;
import io.supertokens.pluginInterface.totp.exception.UnknownDeviceException;

import java.util.List;
import java.util.Map;

public interface TOTPStorage extends NonAuthRecipeStorage {
/**
* Create a new device and a new user if the user does not exist:
Expand All @@ -34,6 +37,14 @@ void updateDeviceName(AppIdentifier appIdentifier, String userId, String oldDevi
TOTPDevice[] getDevices(AppIdentifier appIdentifier, String userId)
throws StorageQueryException;

/**
* Get devices for multiple users in a single query.
* Returns a map of userId to their TOTP devices array.
* Users without any devices will have an empty array.
*/
Map<String, TOTPDevice[]> getDevicesForMultipleUsers(AppIdentifier appIdentifier, List<String> userIds)
throws StorageQueryException;

/**
* Remove expired codes from totp used codes for all users:
*/
Expand Down