idp

package
v0.0.0-...-0ba3bd2 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2015 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Db

type Db interface {
	// 取得。
	Get(id string) (Element, error)

	// まとめて取得。
	// 属性名と該当値の正規表現の連言で絞り込める。
	Search(filter map[string]string) ([]Element, error)
}

ID プロバイダ情報の格納庫。

func NewMemoryDb

func NewMemoryDb(elems []Element) Db

func NewMongoDb

func NewMongoDb(pool *mgo.Session, db, coll string, webDb web.Db) Db

db: DB 名。 coll: コレクション名。

type Element

type Element interface {
	Id() string

	// 言語タグから表示名へのマップ。
	Names() map[string]string

	// 認証エンドポイント。
	AuthUri() string

	// トークンエンドポイント。
	TokenUri() string

	// アカウント情報エンドポイント。
	AccountUri() string

	// 連携元仲介エンドポイント。
	CoopFromUri() string

	// 連携先仲介エンドポイント。
	CoopToUri() string

	// 鍵。
	Keys() []jwk.Key
}

ID プロバイダ情報。

func New

func New(id string, names map[string]string, authUri, tokUri, acntUri, coopFrUri, coopToUri string, keys []jwk.Key) Element

主にテスト用。

Jump to

Keyboard shortcuts

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