Skip to main content

create_token

Function create_token 

Source
pub fn create_token(
    user_id: &str,
    config: &JwtConfig,
    now: DateTime<Utc>,
) -> String
Expand description

Create a signed JWT for the given user id.

The token carries standard claims (sub, iss, aud, iat, exp) and is signed with HMAC-SHA256.