Documentation ¶
Overview ¶
Package persona provides a persona broker for use by clients.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // StandardClaims is the list of standard OIDC claims that personas import into GA4GH Identity objects. StandardClaims = map[string]string{ "azp": "Authorized Party (application identifier)", "email": "Email address", "email_verified": "Email Verified (true or false)", "family_name": "Family Name", "given_name": "Given Name", "iss": "Issuer of the Passport", "locale": "Locale", "middle_name": "Middle Name", "name": "Full Name", "nickname": "Nickname", "picture": "Picture", "preferred_username": "Preferred Username", "profile": "Profile", "sub": "Subject (user identifier)", "zoneinfo": "Zone info (timezone)", } // DefaultScope is a list of standard scopes to request. DefaultScope = "openid ga4gh ga4gh_passport_v1" // AccountScope has default scopes and the account_admin scope. AccountScope = DefaultScope + " account_admin" // LinkScope has account scope plus the additional account-linking scope. LinkScope = AccountScope + " link" )
Functions ¶
func NewAccessToken ¶
func NewAccessToken(name, issuer, clientID, scope string, persona *cpb.TestPersona) (ga4gh.AccessJWT, string, error)
NewAccessToken returns an access token for a persona at a given issuer. The persona parameter may be nil.
Types ¶
type Server ¶
Server is a fake OIDC passport broker service for a playground or test environment. Private keys are well-known and allows any user to act as system administrator. WARNING: ONLY for use with synthetic or test data.
Do not use unless you fully understand the security and privacy implications.
func NewBroker ¶
func NewBroker(issuerURL string, key *testkeys.Key, service, path string, useOIDCPrefix bool) (*Server, error)
NewBroker returns a Persona Broker Server
Click to show internal directories.
Click to hide internal directories.