Skip to content

Commit

Permalink
Fix spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
tarkah committed Apr 15, 2024
1 parent 0ba6e9e commit 331c18d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion crates/service/src/account/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ impl AccountService for Service {
// it's returned from this function and we don't want it to be
// spanned twice
info_span!("authenticate").in_scope(|| {
// Technically the same as ommitting this check
// Technically the same as omitting this check
auth(&request, auth::Flags::NO_AUTH)
})?;

Expand Down
2 changes: 1 addition & 1 deletion crates/service/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ pub struct Config<T> {
/// Tracing configuration
#[serde(default)]
pub tracing: tracing::Config,
/// Generic configuartion that can be specialized by the service
/// Generic configuration that can be specialized by the service
#[serde(flatten)]
pub domain: T,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ CREATE TABLE IF NOT EXISTS endpoint (
account_id TEXT NOT NULL UNIQUE,
description NOT NULL,

-- Role must preceed role specific fields
-- Role must precede role specific fields
role TEXT NOT NULL,

-- Builder fields
Expand Down
6 changes: 3 additions & 3 deletions crates/service/src/endpoint/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl Service {
async fn enroll(&self, request: tonic::Request<EnrollmentRequest>) -> Result<(), Error> {
let request = request.into_inner();

// Proto3 makes all message types optional for backwards compatability
// Proto3 makes all message types optional for backwards compatibility
let issuer = request.issuer.as_ref().ok_or(Error::MalformedRequest)?;
let public_key = EncodedPublicKey::decode(&issuer.public_key).map_err(|_| Error::InvalidPublicKey)?;
let verified_token = Token::verify(&request.account_token, &public_key, &token::Validation::new())
Expand Down Expand Up @@ -273,7 +273,7 @@ impl EndpointService for Service {
&self,
request: tonic::Request<EnrollmentRequest>,
) -> std::result::Result<tonic::Response<()>, tonic::Status> {
// Technically the same as ommitting this check
// Technically the same as omitting this check
auth(&request, auth::Flags::NO_AUTH)?;

if matches!(self.role(), EndpointRole::Hub) {
Expand Down Expand Up @@ -433,7 +433,7 @@ pub enum Error {
/// Endpoint (UUIDv4) cannot be parsed from string
#[error("invalid endpoint")]
InvalidEndpoint(#[source] uuid::Error),
/// Token verfication failed
/// Token verification failed
#[error("verify token")]
VerifyToken(#[source] token::Error),
/// An enrollment error
Expand Down
2 changes: 1 addition & 1 deletion crates/service/src/middleware/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pub fn auth<T>(request: &tonic::Request<T>, validation_flags: Flags) -> Result<(
let validation_names = flag_names(validation_flags);
let token_names = flag_names(request_flags);

// If token flags wholy contains all validation flags,
// If token flags wholly contains all validation flags,
// then user is properly authorized
if request_flags.contains(validation_flags) {
Ok(())
Expand Down
2 changes: 1 addition & 1 deletion crates/service/src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub struct Payload {
/// Account id of the holder
#[serde(rename = "uid")]
pub account_id: account::Id,
/// Acount type of the holder
/// Account type of the holder
#[serde(rename = "act")]
pub account_type: account::Kind,
}
Expand Down

0 comments on commit 331c18d

Please sign in to comment.