public GoogleAuthenticatorToken find(final String uid, final Integer otp) {
        val query = List.of(
            DynamoDbQueryBuilder.builder()
                .key(ColumnNames.USERID.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().s(uid.toLowerCase(Locale.ENGLISH)).build()))
                .operator(ComparisonOperator.EQ)
                .build(),
            DynamoDbQueryBuilder.builder()
                .key(ColumnNames.TOKEN.getColumnName())
                .attributeValue(List.of(AttributeValue.builder().n(String.valueOf(otp)).build()))
                .operator(ComparisonOperator.EQ)
                .build());
        val results = getRecordsByKeys(query);
        return results.isEmpty() ? null : results.iterator().next();
    }
Find.

@param uid the uid
@param otp the otp
@return the google authenticator token
support/cas-server-support-gauth-dynamodb/src/main/java/org/apereo/cas/gauth/token/GoogleAuthenticatorDynamoDbTokenRepositoryFacilitator.java