blob: c803076aaa3f6ddeef89f52c7d59a00a291ff752 [file] [log] [blame]
// Package identity defines services for identity providers in the veyron ecosystem.
package identity
// OAuthBlesser exchanges the provided authorization code for an email addres
// from an OAuth-based identity provider and uses the email address as the
// name to bless the client with.
//
// The redirect URL used to obtain the authorization code must also be
// provided in order to ensure a successful exchange.
type OAuthBlesser interface {
// TODO(ashankar,toddw): Once the "OneOf" type becomes available in VDL,
// then the "any" should be replaced by:
// OneOf<wire.ChainPublicID, []wire.ChainPublicID>
// where wire is from:
// import "veyron2/security/wire"
Bless(authcode, redirecturl string) (blessing any, err error)
}