Documentation
¶
Index ¶
- Variables
- func Code() string
- func Create(ch *account.Record, salt, secret string) error
- func CreateRequest(id string, req *oauth2.AuthorizeRequest) error
- func CreateToken(t *oauth2.Token, clientId, code string) error
- func Delete(id string) error
- func DeleteRequest(id string) error
- func DeleteToken(accessToken string) error
- func Init() error
- func Read(id string) (*account.Record, error)
- func ReadRefresh(refreshToken string) (*oauth2.Token, string, error)
- func ReadRequest(id string) (*oauth2.AuthorizeRequest, error)
- func ReadToken(accessToken string) (*oauth2.Token, string, error)
- func Register(backend DB)
- func Salt() string
- func SaltAndSecret(id string) (string, string, error)
- func Search(clientId, typ string, limit, offset int64) ([]*account.Record, error)
- func Token() string
- func Update(ch *account.Record, salt, secret string) error
- func UpdateToken(accessToken string, t *oauth2.Token) error
- type Account
- type DB
- type Oauth2
Constants ¶
This section is empty.
Variables ¶
Functions ¶
func DeleteRequest ¶
func DeleteToken ¶
func ReadRequest ¶
func ReadRequest(id string) (*oauth2.AuthorizeRequest, error)
Types ¶
type Account ¶
type Account interface { Read(id string) (*account.Record, error) Delete(id string) error Create(acc *account.Record, salt, secret string) error Update(acc *account.Record, salt, secret string) error Search(clientId, typ string, limit, offset int64) ([]*account.Record, error) SaltAndSecret(id string) (string, string, error) }
Account interface db
type Oauth2 ¶
type Oauth2 interface { ReadRequest(id string) (*oauth2.AuthorizeRequest, error) CreateRequest(id string, req *oauth2.AuthorizeRequest) error DeleteRequest(id string) error ReadToken(accessToken string) (*oauth2.Token, string, error) ReadRefresh(refreshToken string) (*oauth2.Token, string, error) CreateToken(token *oauth2.Token, clientId string, code string) error UpdateToken(accessToken string, token *oauth2.Token) error DeleteToken(accessToken string) error }
Oauth2 interfae db
Click to show internal directories.
Click to hide internal directories.