Skip to content

mailhedgehog/authenticationFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MailHedgehog package to authenticate via file storage

All users data stored in physical file on server. Useful for simple implementation with small amount of users.

Usage

package main

import (
    "github.com/mailhedgehog/gounit"
    "testing"
)

func Test(t *testing.T) {
    config := &contracts.AuthenticationConfig{}
    config.Dashboard.ViaPasswordAuthentication.Enabled = true
    auth := CreateFileAuthentication(&StorageConfiguration{Path: filePath}, config)

    (*gounit.T)(t).AssertTrue(auth.Dashboard().ViaPasswordAuthentication().Authenticate("user1", "foobar"))
}

Development

go mod tidy
go mod verify
go mod vendor
go test --cover

Credits

  • Think Studio

About

MailHedgehog package to authenticate via file storage

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages