mirror of
https://github.com/TECHNOFAB11/jwt-authorizer.git
synced 2025-12-11 23:50:07 +01:00
fix(doc): use automatic links, add module comment
This commit is contained in:
parent
6dd6b11880
commit
b548c773d1
3 changed files with 5 additions and 3 deletions
|
|
@ -1,3 +1,5 @@
|
||||||
|
//! Demo server - for demo and testing purposes
|
||||||
|
|
||||||
use axum::{routing::get, Router};
|
use axum::{routing::get, Router};
|
||||||
use jwt_authorizer::{
|
use jwt_authorizer::{
|
||||||
error::InitError, AuthError, Authorizer, IntoLayer, JwtAuthorizer, JwtClaims, Refresh, RefreshStrategy,
|
error::InitError, AuthError, Authorizer, IntoLayer, JwtAuthorizer, JwtClaims, Refresh, RefreshStrategy,
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
/// The number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time ignoring leap seconds.
|
/// The number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time ignoring leap seconds.
|
||||||
/// (https://www.rfc-editor.org/rfc/rfc7519#section-2)
|
/// (<https://www.rfc-editor.org/rfc/rfc7519#section-2>)
|
||||||
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, Debug)]
|
#[derive(Deserialize, Serialize, Clone, PartialEq, Eq, Debug)]
|
||||||
pub struct NumericDate(pub i64);
|
pub struct NumericDate(pub i64);
|
||||||
|
|
||||||
|
|
@ -53,7 +53,7 @@ pub struct StringList(Vec<String>);
|
||||||
|
|
||||||
/// Claims mentioned in the JWT specifications.
|
/// Claims mentioned in the JWT specifications.
|
||||||
///
|
///
|
||||||
/// https://www.rfc-editor.org/rfc/rfc7519#section-4.1
|
/// <https://www.rfc-editor.org/rfc/rfc7519#section-4.1>
|
||||||
#[derive(Deserialize, Serialize, Clone, Debug)]
|
#[derive(Deserialize, Serialize, Clone, Debug)]
|
||||||
pub struct RegisteredClaims {
|
pub struct RegisteredClaims {
|
||||||
#[serde(skip_serializing_if = "Option::is_none")]
|
#[serde(skip_serializing_if = "Option::is_none")]
|
||||||
|
|
|
||||||
|
|
@ -139,7 +139,7 @@ impl From<AuthError> for Response {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// (https://datatracker.ietf.org/doc/html/rfc6750#section-3.1)
|
/// (<https://datatracker.ietf.org/doc/html/rfc6750#section-3.1>)
|
||||||
impl IntoResponse for AuthError {
|
impl IntoResponse for AuthError {
|
||||||
fn into_response(self) -> Response {
|
fn into_response(self) -> Response {
|
||||||
match self {
|
match self {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue