Skip to content

Commit

Permalink
Move LoginError to core
Browse files Browse the repository at this point in the history
  • Loading branch information
ljoonal committed Apr 14, 2023
1 parent 3c10453 commit e40aa2f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
10 changes: 10 additions & 0 deletions onlivfe/src/auth.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
use crate::PlatformAccountId;

/// An error that occurred with the login
#[derive(Debug, Clone)]
pub enum LoginError {
/// An error occurred
Error(String),
/// The authentication was partially successful, but requires additional
/// verification
RequiresAdditionalFactor(PlatformAccountId),
}

crate::platform_enum!(
/// Credentials for a platform
Authentication {
Expand Down
11 changes: 1 addition & 10 deletions onlivfe_net/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use onlivfe::{
Instance,
InstanceId,
LoginCredentials,
LoginError,
PlatformAccount,
PlatformAccountId,
PlatformDataAndMetadata,
Expand All @@ -43,16 +44,6 @@ mod cvr;
mod neosvr;
mod vrchat;

/// An error that occurred with the login
#[derive(Debug, Clone)]
pub enum LoginError {
/// An error occurred
Error(String),
/// The authentication was partially successful, but requires additional
/// verification
RequiresAdditionalFactor(PlatformAccountId),
}

/// An unified API client interface for the different platforms
pub struct OnlivfeApiClient {
user_agent: String,
Expand Down
2 changes: 1 addition & 1 deletion onlivfe_wrapper/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ use onlivfe::{
Instance,
InstanceId,
LoginCredentials,
LoginError,
PlatformAccount,
PlatformAccountId,
PlatformFriend,
PlatformType,
Profile,
ProfileId,
};
use onlivfe_net::LoginError;
use strum::IntoEnumIterator;

/// Initializes some static global parts of the core, setting up logging &
Expand Down

0 comments on commit e40aa2f

Please sign in to comment.