func (g StoreTokenGetter) GetToken(ctx context.Context) (*usso.SSOData, error) {
	tok, err := g.Store.Get()
	if err == nil {
		return tok, nil
	}
	if g.TokenGetter == nil {
		return nil, errgo.Mask(err, errgo.Any)
	}
	tok, err = g.TokenGetter.GetToken(ctx)
	if err == nil {
		// Ignore any errors storing the token, the user will
		// just have to get it again next time.
		g.Store.Put(tok)
	}
	return tok, errgo.Mask(err, errgo.Any)
}
// GetToken implements TokenGetter.GetToken. A token is first attmepted
// to retireve from the store. If a stored token is not available then
// GetToken will fallback to TokenGetter.GetToken (if configured).
GetToken implements TokenGetter.GetToken. A token is first attmepted
to retireve from the store. If a stored token is not available then
GetToken will fallback to TokenGetter.GetToken (if configured).
// GetToken implements TokenGetter . GetToken . A token is first attmepted // to retireve from the store . If a stored token is not available then // GetToken will fallback to TokenGetter . GetToken ( if configured ) .
func (g StoreTokenGetter) GetToken(ctx context.Context) (*usso.SSOData, error) {
	tok, err := g.Store.Get()
	if err == nil {
		return tok, nil
	}
	if g.TokenGetter == nil {
		return nil, errgo.Mask(err, errgo.Any)
	}
	tok, err = g.TokenGetter.GetToken(ctx)
	if err == nil {
		g.Store.Put(tok)
	}
	return tok, errgo.Mask(err, errgo.Any)
}
func ( g StoreTokenGetter ) GetToken ( ctx context . Context ) ( * usso . SSOData , error ) { tok , err := g . Store . Get ( ) if err == nil { return tok , nil } if g . TokenGetter == nil { return nil , errgo . Mask ( err , errgo . Any ) } tok , err = g . TokenGetter . GetToken ( ctx ) if err == nil { g . Store . Put ( tok ) } return tok , errgo . Mask ( err , errgo . Any ) }
GetToken implements TokenGetter.GetToken.
GetToken implements TokenGetter . GetToken .
// Ignore any errors storing the token, the user will // just have to get it again next time.