pub struct AppRegistration { /* private fields */ }Expand description
The published GitHub App this product authenticates as (D3, D16).
Both fields are public by design. 07-security.md’s credential inventory
lists the client_id as “Not secret … may appear in logs and documentation”,
which is exactly what makes the device flow serverless: a public client
cannot secure a client secret, and this design never tries to.
The concrete values are not compiled in here. Registering and publishing
the App is Phase 0 of 06-migration-rollout.md and has not happened, so
there is no honest value to write; f1 supplies both when it wires the CLI.
Committing a placeholder that looked real would be worse than requiring the
caller to pass one.
Implementations§
Source§impl AppRegistration
impl AppRegistration
Sourcepub fn new(
client_id: impl Into<String>,
slug: impl Into<String>,
) -> Result<Self, ConfigError>
pub fn new( client_id: impl Into<String>, slug: impl Into<String>, ) -> Result<Self, ConfigError>
§Errors
An empty client_id or an empty slug.
pub fn client_id(&self) -> &str
pub fn slug(&self) -> &str
Sourcepub fn install_url(&self, endpoints: &Endpoints) -> Url
pub fn install_url(&self, endpoints: &Endpoints) -> Url
The canonical URL a user with no installation must visit.
03-control-flows.md flow 1.1: “If the published App is not yet installed
on any repository, it prints the installation URL.”
§Panics
Never, for a registration built through AppRegistration::new: the slug
is non-empty and is percent-encoded into the path.
Trait Implementations§
Source§impl Clone for AppRegistration
impl Clone for AppRegistration
Source§fn clone(&self) -> AppRegistration
fn clone(&self) -> AppRegistration
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AppRegistration
impl Debug for AppRegistration
impl Eq for AppRegistration
Source§impl PartialEq for AppRegistration
impl PartialEq for AppRegistration
impl StructuralPartialEq for AppRegistration
Auto Trait Implementations§
impl Freeze for AppRegistration
impl RefUnwindSafe for AppRegistration
impl Send for AppRegistration
impl Sync for AppRegistration
impl Unpin for AppRegistration
impl UnsafeUnpin for AppRegistration
impl UnwindSafe for AppRegistration
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.