//Show - show if the user exists and already has an org or not.
327028
func (s *orgManager) Show() (result *PivotOrg, err error) {
	result = new(PivotOrg)
	userInfo := GetUserInfo(s.tokens)
	NewUserMatch().UserInfo(userInfo).UserName(s.username).OnSuccess(func() {
		s.log.Println("getting userInfo: ", userInfo)
		s.log.Println("result value: ", result)
		err = s.store.FindOne(bson.M{EmailFieldName: s.username}, result)
		s.log.Println("response: ", result, err)
	}).OnFailure(func() {
		s.log.Println(ErrCantCallAcrossUsers.Error())
		err = ErrCantCallAcrossUsers
	}).Run()
	return
}
1169975
func (c *NamedspacesController) Show(ctx *app.ShowNamedspacesContext) error {
	if ctx.UserName == "" {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound("not found, userName=%v", ctx.UserName))
	}

	if ctx.SpaceName == "" {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrNotFound("not found, spaceName=%v", ctx.SpaceName))
	}

	var s *space.Space
	err := application.Transactional(c.db, func(appl application.Application) error {
		identity, err := loadKeyCloakIdentityByUserName(ctx, appl, ctx.UserName)
		if err != nil {
			return goa.ErrNotFound("not found, userName=%v", ctx.UserName)
		}
		s, err = appl.Spaces().LoadByOwnerAndName(ctx.Context, &identity.ID, &ctx.SpaceName)
		return err
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	spaceData, err := ConvertSpaceFromModel(ctx.Request, *s, IncludeBacklogTotalCount(ctx.Context, c.db))
	if err != nil {
		return err
	}
	resp := app.SpaceSingle{
		Data: spaceData,
	}
	return ctx.OK(&resp)
}
143521
func (s *FriendshipService) Show(params *FriendshipShowParams) (*Relationship, *http.Response, error) {
	response := new(RelationshipResponse)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("show.json").QueryStruct(params).Receive(response, apiError)
	return response.Relationship, resp, relevantError(err, *apiError)
}
1084699
func (k *ksonnetApp) Show(environment string) ([]*unstructured.Unstructured, error) {
	out, err := k.ksCmd("show", environment)
	if err != nil {
		return nil, fmt.Errorf("`ks show` failed: %v", err)
	}
	return kube.SplitYAML(out)
}
640319
func (p Show) Init(ctx sessionctx.Context) *Show {
	p.basePlan = newBasePlan(ctx, TypeShow)
	return &p
}
1239089
func (c *OpenidConfigurationController) Show(ctx *app.ShowOpenidConfigurationContext) error {

	issuer := rest.AbsoluteURL(ctx.RequestData, "", nil)
	authorizationEndpoint := rest.AbsoluteURL(ctx.RequestData, client.AuthorizeAuthorizePath(), nil)
	tokenEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ExchangeTokenPath(), nil)
	userinfoEndpoint := rest.AbsoluteURL(ctx.RequestData, client.ShowUserinfoPath(), nil)
	logoutEndpoint := rest.AbsoluteURL(ctx.RequestData, client.LogoutLogoutPath(), nil)
	jwksURI := rest.AbsoluteURL(ctx.RequestData, client.KeysTokenPath(), nil)

	authOpenIDConfiguration := &app.OpenIDConfiguration{
		// REQUIRED properties
		Issuer:                 &issuer,
		AuthorizationEndpoint:  &authorizationEndpoint,
		TokenEndpoint:          &tokenEndpoint,
		EndSessionEndpoint:     &logoutEndpoint,
		ResponseTypesSupported: []string{"code"},
		JwksURI:                &jwksURI,

		// subject_types_supported REQUIRED. JSON array containing a list of the Subject Identifier types that this OP supports. Valid types include pairwise and public.
		// A Subject Identifier is a locally unique and never reassigned identifier within the Issuer for the End-User, which is intended to be consumed by the Client.
		// http://openid.net/specs/openid-connect-core-1_0.html#SubjectIDTypes
		// subject ==  identity
		SubjectTypesSupported: []string{"public"},
		// id_token_signing_alg_values_supported REQUIRED. JSON array containing a list of the JWS signing algorithms (alg values) supported by the OP for the ID Token to encode the Claims in a JWT [JWT].
		// The algorithm RS256 MUST be included. The value none MAY be supported, but MUST NOT be used unless the Response Type used returns no ID Token from the Authorization Endpoint (such as when using the Authorization Code Flow).
		IDTokenSigningAlgValuesSupported: []string{"RS256"},

		// RECOMMENDED properties
		UserinfoEndpoint: &userinfoEndpoint,
		ScopesSupported:  []string{"openid", "offline_access"},
		ClaimsSupported:  []string{"sub", "iss", "auth_time", "name", "given_name", "family_name", "preferred_username", "email"},

		// OPTIONAL properties
		GrantTypesSupported: []string{"authorization_code", "refresh_token", "client_credentials"},
		// client_secret_post for client_credentials grant_type
		// client_secre_jwt for authorizatoin_code grant_type
		TokenEndpointAuthMethodsSupported: []string{"client_secret_post", "client_secret_jwt"},
		// response_modes_supported
	}

	return ctx.OK(authOpenIDConfiguration)
}
645202
func (s *Secret) Show(secretUuid *string) (*Secret, *http.Response, []error) {
	secret := Secret{}
	k := kumoru.New()

	k.Get(fmt.Sprintf("%s/v1/secrets/%s", k.EndPoint.Authorization, *secretUuid))
	k.SignRequest(true)

	resp, body, errs := k.End()

	if errs != nil {
		return &secret, resp, errs
	}

	err := json.Unmarshal([]byte(body), &secret)

	if err != nil {
		errs = append(errs, err)
		return &secret, resp, errs
	}

	return &secret, resp, errs
}
770098
func (c *QueryController) Show(ctx *app.ShowQueryContext) error {
	currentUserIdentityID, err := login.ContextIdentity(ctx)
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
	}
	var q *query.Query
	err = application.Transactional(c.db, func(appl application.Application) error {
		err := appl.Spaces().CheckExists(ctx, ctx.SpaceID)
		if err != nil {
			return errs.WithStack(err)
		}
		q, err = appl.Queries().Load(ctx, ctx.QueryID, ctx.SpaceID)
		return errs.WithStack(err)
	})
	if err != nil {
		return jsonapi.JSONErrorResponse(ctx, err)
	}
	if *currentUserIdentityID != q.Creator {
		log.Warn(ctx, map[string]interface{}{
			"query_id":     ctx.QueryID,
			"creator":      q.Creator,
			"current_user": *currentUserIdentityID,
		}, "user is not the query creator")
		return jsonapi.JSONErrorResponse(ctx, errors.NewForbiddenError("user is not the query creator"))
	}
	res := &app.QuerySingle{
		Data: ConvertQuery(ctx.Request, *q),
	}
	return ctx.OK(res)
}
323228
func (wr *Wrangler) ShowResharding(ctx context.Context, keyspace, shard string) (err error) {
	ki, err := wr.ts.GetKeyspace(ctx, keyspace)
	if err != nil {
		return err
	}
	if len(ki.ServedFroms) == 0 {
		return wr.showHorizontalResharding(ctx, keyspace, shard)
	}
	return wr.showVerticalResharding(ctx, keyspace, shard)
}
1043906
func (m *Matrix) Show() {
	for y := 0; y < int(m.Rows); y++ {
		for x := 0; x < int(m.Cols); x++ {
			fmt.Printf("%f ", m.M[y][x])
		}
		fmt.Println()
	}
}
554513
func Show(cmd *cli.Cmd) {
	uuid := cmd.String(cli.StringArg{
		Name:      "UUID",
		Desc:      "Application UUID",
		HideValue: true,
	})

	cmd.Action = func() {
		app := application.Application{
			UUID: *uuid,
		}

		application, resp, errs := app.Show()

		if errs != nil {
			log.Fatalf("Could not retrieve application: %s", errs)
		}

		if resp.StatusCode != 200 {
			log.Fatalf("Could not retrieve application: %s", resp.Status)
		}

		printAppDetail(application)
	}
}
36329
func (w *HTTPProvider) Present(domain, token, keyAuth string) error {
	var errs []error

	challengePath := path.Join("/", http01.ChallengePath(token))
	for _, host := range w.hosts {
		mc, err := memcache.New(host)
		if err != nil {
			errs = append(errs, err)
			continue
		}
		_ = mc.Add(&memcache.Item{
			Key:        challengePath,
			Value:      []byte(keyAuth),
			Expiration: 60,
		})
	}

	if len(errs) == len(w.hosts) {
		return fmt.Errorf("unable to store key in any of the memcache hosts -> %v", errs)
	}

	return nil
}
1033758
func (s *StatusService) Show(id int64, params *StatusShowParams) (*Tweet, *http.Response, error) {
	if params == nil {
		params = &StatusShowParams{}
	}
	params.ID = id
	tweet := new(Tweet)
	apiError := new(APIError)
	resp, err := s.sling.New().Get("show.json").QueryStruct(params).Receive(tweet, apiError)
	return tweet, resp, relevantError(err, *apiError)
}
296224
func (engine *Engine) ShowSQL(show ...bool) {
	engine.logger.ShowSQL(show...)
	if len(show) == 0 {
		engine.TLogger.SQL.Disabled = false
	} else {
		engine.TLogger.SQL.Disabled = show[0] == false
	}
}
753577
func (m *MetaClient) ShowCluster(ctx context.Context) (*Cluster, error) {
	res, err := m.Do(ctx, "/show-cluster", "GET", m.authorizer, nil, nil)
	if err != nil {
		return nil, err
	}

	defer res.Body.Close()
	dec := json.NewDecoder(res.Body)
	out := &Cluster{}
	err = dec.Decode(out)
	if err != nil {
		return nil, err
	}
	return out, nil
}
402386
func Display(d, xauthPath string) ServiceOption {
	return func(s *Service) error {
		if s.display != "" {
			return fmt.Errorf("service display already set: %v", s.display)
		}
		if s.xauthPath != "" {
			return fmt.Errorf("service xauth path already set: %v", s.xauthPath)
		}
		if !isDisplay(d) {
			return fmt.Errorf("supplied display %q must be of the format 'x' or 'x.y' where x and y are integers", d)
		}
		s.display = d
		s.xauthPath = xauthPath
		return nil
	}
}
494530
func showToken() error {
	// get the token
	tokData, err := loadData(*flagShow)
	if err != nil {
		return fmt.Errorf("Couldn't read token: %v", err)
	}

	// trim possible whitespace from token
	tokData = regexp.MustCompile(`\s*$`).ReplaceAll(tokData, []byte{})
	if *flagDebug {
		fmt.Fprintf(os.Stderr, "Token len: %v bytes\n", len(tokData))
	}

	token, err := jwt.Parse(string(tokData), nil)
	if token == nil {
		return fmt.Errorf("malformed token: %v", err)
	}

	// Print the token details
	fmt.Println("Header:")
	if err := printJSON(token.Header); err != nil {
		return fmt.Errorf("Failed to output header: %v", err)
	}

	fmt.Println("Claims:")
	if err := printJSON(token.Claims); err != nil {
		return fmt.Errorf("Failed to output claims: %v", err)
	}

	return nil
}