onemember

package
v0.0.0-...-80b24d7 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2014 License: Apache-2.0, Apache-2.0 Imports: 4 Imported by: 0

README

onemember

Documentation

Index

Constants

View Source
const (
	PACKAGE string = "oneMember"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	Created        string          `json:"created"`
	Claims         []Claim         `json:"claims"`
	Email          string          `json:"email"`
	HashedPassword string          `json:"hashedPassword,omitempty" out:"false"`
	LinkedAccounts []LinkedAccount `json:"linkedAccount"`
	Salt           string          `json:"salt,omitempty" out:"false"`
	Tenant         string          `json:"tenant"`
	Username       string          `json:"username"`
}

func (*Account) AddClaim

func (a *Account) AddClaim(c Claim)

func (*Account) RemoveClaim

func (a *Account) RemoveClaim(claimType string, provider string)

type AccountService

type AccountService interface {
	AuthAccount(username string, password string) (*Account, error)
	AddClaim(in *Account, claim Claim) error
	Create(username string, password string, email string) (*Account, error)
	GetByUsername(username string) (*Account, error)
	RemoveClaim(in *Account, claimType string, provider string) error
	SetLinkedAccount(in *Account, provider string, claims []Claim) error
	Update(in *Account) error
}

func New

type Claim

type Claim struct {
	Provider string `json:"provider"`
	Type     string `json:"type"`
	Value    string `json:"value"`
}

type DataConnector

type DataConnector interface {
	OnememberCreate(in *Account) error
	OnememberRead(uid string) (map[string]interface{}, error)
	OnememberUpdate(in *Account) error
}

type LinkedAccount

type LinkedAccount struct {
	LastLogin string `json:"lastLogin"`
	Provider  string `json:"provider"`
}

Jump to

Keyboard shortcuts

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