-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
185 additions
and
186 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,30 @@ | ||
#![feature(cow_is_borrowed)] | ||
#![feature(assert_matches)] | ||
#![deny(clippy::all)] | ||
//! Turborepo's library for authenticating with the Vercel API. | ||
//! Handles logging into Vercel, verifying SSO, and storing the token. | ||
|
||
mod auth; | ||
mod error; | ||
mod server; | ||
mod login_server; | ||
mod ui; | ||
|
||
pub use auth::*; | ||
pub use error::Error; | ||
pub use server::*; | ||
pub use login_server::*; | ||
|
||
/// Token is the result of a successful login. It contains the token string and | ||
/// a boolean indicating whether the token already existed on the filesystem. | ||
#[derive(Debug)] | ||
pub enum Token { | ||
Existing(String), | ||
New(String), | ||
} | ||
impl Token { | ||
pub fn into_inner(self) -> String { | ||
match self { | ||
Self::Existing(s) => s, | ||
Self::New(s) => s, | ||
} | ||
} | ||
} |
Oops, something went wrong.