1use axum::response::{IntoResponse, Response};
8use axum_extra::typed_header::TypedHeader;
9use headers::ContentType;
10use mas_jose::jwt::Jwt;
11use mime::Mime;
12
13pub struct JwtResponse<T>(pub Jwt<'static, T>);
14
15impl<T> IntoResponse for JwtResponse<T> {
16 fn into_response(self) -> Response {
17 let application_jwt: Mime = "application/jwt".parse().unwrap();
18 let content_type = ContentType::from(application_jwt);
19 (TypedHeader(content_type), self.0.into_string()).into_response()
20 }
21}