Skip to content

JwtAuth from version 0.44 to 0.45 #311

Answered by chrislearn
josejachuf asked this question in Q&A
Discussion options

You must be logged in to vote

Try this:

pub fn auth_handler(secret_key: String) -> JwtAuth<JwtClaims, ConstDecoder> {  

    JwtAuth::new(ConstDecoder::from_secret(secret_key.as_bytes()))
        .finders(vec![
            Box::new(HeaderFinder::new()),            
        ])
        .force_passed(true)
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@chrislearn
Comment options

Answer selected by josejachuf
@josejachuf
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants