Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use thiserror::Error;

#[derive(Error, Debug)]
#[non_exhaustive]
pub enum GitHubOIDCError {
#[error("Invalid token format. Expected a JWT.")]
InvalidTokenFormat,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
mod errors;
use errors::GitHubOIDCError;
pub use errors::GitHubOIDCError;
use jsonwebtoken::{decode, Algorithm, DecodingKey, Validation};
use log::{debug, error, info, warn};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -58,7 +58,7 @@ pub struct GithubJWKS {
/// This struct helps decode and access the information from that token.
#[derive(Debug, Serialize, Deserialize)]
pub struct GitHubClaims {
/// The subject of the token (e.g the GitHub Actions runner ID).
/// The subject of the token (e.g. the GitHub Actions runner ID).
pub sub: String,

/// The full name of the repository.
Expand Down
Loading