authplay

package module
v0.0.0-...-9c5e671 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2019 License: MIT Imports: 10 Imported by: 0

README

Auth N Play

Discord

Simple project to exercise OAuth web flows.

Changelog

Starts server and listens on port 8888

/ returns login form or session data post OAuth / also returns response for /users and /user/repos/

/graphql returns json encoded data for custom queries, only to be accessed after GitHub auth flow on /

To Run

#!/bin/bash
cd test
GITHUB_CLIENT_ID=<client_id> GITHUB_CLIENT_SECRET=<client_secret> GITHUB_APP_ID=<app_id> GITHUB_APP_NAME=<app_name> GHA="yes|no" go run test_server.go

GHA=yes triggers GitHub App install and redirect to OAuth flow.

CTRL-C to kill the server, it captures SIGINT and cleans up.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Server

type Server interface {
	Start()
}

Server is root daemon process

func NewServer

func NewServer() (Server, error)

NewServer creates Server

type ServerOptions

type ServerOptions struct {
	Port int
}

ServerOptions used to pass params to the Server

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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