-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add dart specific support for realm_http_transport_new * Copy all info from realm_http_request before starting async request * Added ApplicationConfiguration * Added Application class with async logIn method (includes stubs for User and Credentials) * Add support for http_transport * Added ApplicationConfiguration * Added Application class with async logIn method (includes stubs for User) * Add baasTest function * Fix header enumeration bug * Use invokeGetBool to check the app_log_in_with_credentials result * Support weak and persistent handles * Change user login to use persistent handle for the completer object * Move creation of httpTransportHandle, appConfigHandle and sycnClientConfigHandle inside getApp since they are not needed anywhere else. This allows the GC to collect them when out of scope. Native instances are preserved by Core * use non async login method * set skip to error if url is null Co-authored-by: Kasper Overgård Nielsen <[email protected]> Co-authored-by: blagoev <[email protected]> Co-authored-by: Kasper Overgård Nielsen <[email protected]>
- Loading branch information
1 parent
d51867f
commit b21f01f
Showing
11 changed files
with
263 additions
and
53 deletions.
There are no files selected for viewing
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
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,36 @@ | ||
//////////////////////////////////////////////////////////////////////////////// | ||
// | ||
// Copyright 2022 Realm Inc. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
//////////////////////////////////////////////////////////////////////////////// | ||
import 'native/realm_core.dart'; | ||
|
||
/// This class represents a user in a MongoDB Realm app. | ||
/// A user can log in to the server and, if access is granted, it is possible to synchronize the local Realm to MongoDB. | ||
/// Moreover, synchronization is halted when the user is logged out. It is possible to persist a user. By retrieving a user, there is no need to log in again. | ||
/// Persisting a user between sessions, the user's credentials are stored | ||
/// locally on the device, and should be treated as sensitive data. | ||
/// {@category Application} | ||
class User { | ||
final UserHandle _handle; | ||
|
||
User._(this._handle); | ||
} | ||
|
||
/// @nodoc | ||
extension UserInternal on User { | ||
static User create(UserHandle handle) => User._(handle); | ||
} |
Oops, something went wrong.