Skip to content

Consider implementing FromRequest for authentication method #5

@fairingrey

Description

@fairingrey

This actually doesn't seem too difficult. Consider implementing the FromRequest trait for our auth method so we don't have to call a specific method all the time to get the auth object.

https://actix.rs/actix-web/actix_web/trait.FromRequest.html

Concerning code is here:

https://github.com/fairingrey/actix-realworld-example-app/blob/master/src/utils/auth.rs

Thanks to @colelawrence for letting me know of the idea!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions