auth

Paddy 2014-09-01 Parent:c50153e44821 Child:5bf0a5fd1d01

27:043906283c65 Go to Latest

auth/grant.go

Rough out profiles. Create a Profile type that stores information about user profiles. Create a Login type that stores information about a login strategy for user profiles. This is necessary so that a user can login with their username or email address, with usernames not being required if an email address is supplied and email addresses not being required if a username is supplied.

History
1 package auth
3 import (
4 "time"
6 "secondbit.org/uuid"
7 )
9 type Grant struct {
10 Code string
11 Created time.Time
12 ExpiresIn int32
13 ClientID uuid.ID
14 Scope string
15 RedirectURI string
16 State string
17 }
19 type GrantStore interface {
20 GetGrant(code string) (Grant, error)
21 SaveGrant(grant Grant) error
22 DeleteGrant(id uuid.ID) error
23 }