auth

Paddy 2014-07-18 Child:3423c552e249

0:7a6f64db7246 Go to Latest

auth/client.go

Start rewriting the repo. This code originally was a carbon copy of https://github.com/RangelReale/osin, but I am methodically stripping out the extensible nature of it for a simpler interface, while simultaneously bringing the style into line with the Ducky style.

History
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/client.go	Fri Jul 18 07:13:22 2014 -0400
     1.3 @@ -0,0 +1,35 @@
     1.4 +package oauth2
     1.5 +
     1.6 +import (
     1.7 +	"secondbit.org/uuid"
     1.8 +)
     1.9 +
    1.10 +// Client information
    1.11 +type Client struct {
    1.12 +	ID          uuid.ID
    1.13 +	Secret      string
    1.14 +	RedirectURI string
    1.15 +	OwnerID     uuid.ID
    1.16 +	Name        string
    1.17 +	Logo        string
    1.18 +}
    1.19 +
    1.20 +func GetClient(id uuid.ID, ctx Context) (Client, error) {
    1.21 +	return Client{}, nil
    1.22 +}
    1.23 +
    1.24 +func createClient(name, logo, redirectURI string, owner uuid.ID, ctx Context) (Client, error) {
    1.25 +	return Client{}, nil
    1.26 +}
    1.27 +
    1.28 +func updateClient(client *Client, name, logo, redirectURI *string, ctx Context) error {
    1.29 +	return nil
    1.30 +}
    1.31 +
    1.32 +func removeClient(id uuid.ID, ctx Context) error {
    1.33 +	return nil
    1.34 +}
    1.35 +
    1.36 +func listClients(id uuid.ID, page, num int, ctx Context) ([]Client, error) {
    1.37 +	return []Client{}, nil
    1.38 +}