authnz-common 0.2.1

Authnz common library (types and utils).
Documentation
//! Authnz common library.
//!
//! Contains common types and utils for Impulse Authnz server & SDKs.

#![deny(warnings, missing_docs, clippy::todo, clippy::unimplemented, clippy::unwrap_used)]
#![feature(if_let_guard, let_chains)]

mod types;
pub use types::*;

mod utils;
pub use utils::*;

/// Sign header name.
///
/// Used to sign app requests and Authnz server responses.
pub const SIGN: &str = "Authnz-Sign";

/// Stateless hints header name.
///
/// Provides signed hints and stateless checks on user registration to avoid DoS attacks.
pub const SIGNUP_HINTS: &str = "Authnz-Hints";

/// Client challenge token header name.
///
/// Used to store challenge signed by Authnz server during client token update process.
pub const CLIENT_CHALLENGE_TOKEN: &str = "Authnz-Challenge-State";

/// Client challenge header name.
///
/// Used to transfer challenge to client during client token update process.
pub const CLIENT_CHALLENGE: &str = "Authnz-Challenge";

/// Client challenge sign header name.
///
/// Used to transfer challenge sign to Authnz server during client token update process.
pub const CLIENT_CHALLENGE_SIGN: &str = "Authnz-Challenge-Sign";

/// Access token header/cookie name.
pub const ACCESS_TOKEN: &str = "Authnz-Access";
/// Refresh token header/cookie name.
pub const REFRESH_TOKEN: &str = "Authnz-Refresh";
/// Client token header/cookie name.
pub const CLIENT_TOKEN: &str = "Authnz-Client";

/// Forwarded from header name.
pub const FORWARDED_FROM: &str = "Authnz-Forwarded-From";

pub use chrono;