auth

package module
v0.0.0-...-4e86a80 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2016 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

Development

Running integration tests

Execute tests

Provisioning is happening inside TestMain

go test -v -tags integration

Testing locally

Build project container, it will produce docker image:

nildev build github.com/nildev/auth

Create local.env file in root dir with content:

ND_SIGN_KEY=__YOUR_VAL__
ND_ENV=__YOUR_VAL__
ND_SIGN_KEY=__YOUR_VAL__

ND_GITHUB_SCOPE=__YOUR_VAL__
ND_GITHUB_CLIENT_ID=__YOUR_VAL__
ND_GITHUB_SECRET=__YOUR_VAL__

ND_DO_CLIENT_ID=__YOUR_VAL__ 
ND_DO_SECRET=__YOUR_VAL__
ND_DO_SCOPE=__YOUR_VAL__
ND_DO_REDIRECT_URL=__YOUR_VAL__

Run containers:

docker-compose -f docker-compose.yml up -d

Execute HTTP request:

curl -X GET  http://$(docker-machine ip nildev):8080/api/v1/auth/github/authCode -v

Project Details

Release Notes

See the releases tab for more information on each release.

Contributing

See CONTRIBUTING for details on submitting patches and contacting developers via IRC and mailing lists.

License

Project is released under the MIT license. See the LICENSE file for details.

Specific components of project use code derivative from software distributed under other licenses; in those cases the appropriate licenses are stipulated alongside the code.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Auth

func Auth(provider string, authCode string) (token string, err error)

Auth user and return access token @method GET @path /auth/{provider}/{authCode}

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL