Skip to content

Need an easier way to add password validation logic #18

Open
@drognisep

Description

@drognisep

Maybe I'm missing something, but with the latest version the only way I've found to add password verification logic and to avoid storing client secrets in the clear is to wrap the client store and return a different representation that implements ClientPasswordVerifier for calls to GetByID.

I feel like there should be an easier way to do this. Since the expected return value of the store's GetByID method is an interface, couldn't a config option be added to provide a store-wide verifier function and return a ClientInfo impl struct that uses it?

This is also complicated by the fact that the data column seems to be what is actually populating values. I'm not sure why that duplication is necessary when the column data could simply be copied over instead of introducing the reflection overhead of the JSON decoder.

All in all, I wish it were easier to do the "right" thing and not store secrets in the clear.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions