// Get retrieves a CSRF token from the session cookie. It returns an empty token
// if decoding fails (e.g. HMAC validation fails or the named cookie doesn't exist).
496860
func (cs *cookieStore) Get(r *http.Request) ([]byte, error) {
	// Retrieve the cookie from the request
	cookie, err := r.Cookie(cs.name)
	if err != nil {
		return nil, err
	}

	token := make([]byte, tokenLength)
	// Decode the HMAC authenticated cookie.
	err = cs.sc.Decode(cs.name, cookie.Value, &token)
	if err != nil {
		return nil, err
	}

	return token, nil
}
416947
func (m *Mercury) Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) {
	return m.cliv3.Get(ctx, m.parseKey(key), opts...)
}
1124208
func (s *meController) Get() interface{} {
	var handler MeGetHandler = func(log *log.Logger, r render.Render, tokens oauth2.Tokens) {
		userInfo := GetUserInfo(tokens)
		log.Println("getting userInfo: ", userInfo)
		genericResponseFormatter(r, "", userInfo, nil)
	}
	return handler
}
836698
func (s *MemorySession) Get(key string) (interface{}, error) {
	if value, ok := s.data[key]; ok {
		return value, nil
	}
	return nil, fmt.Errorf("key %q in session (id %s) not found", key, s.sid)
}
672794
func (f *Request) Get(url string) *Request {
	f.Url(url).Method("GET")
	return f
}
1259369
func (m *TokenManager) Get(key string) (token Token) {
	stmt := Tokens.Select().Where(Tokens.C("key").Equals(key))
	m.conn.Query(stmt, &token)
	return
}
244647
func (c *Client) Get(ctx context.Context, url string, id string, payload interface{}) error {
	url = fmt.Sprintf("%s/%s", url, id)
	req, err := c.NewRequest("GET", url, nil)
	if err != nil {
		return err
	}

	_, err = c.Do(ctx, req, payload)
	return err
}
616214
func (m *Manager) Get(r *http.Request, name string) (*Session, error) {
	s := Session{
		Name:     name,
		Domain:   m.config.Domain,
		Path:     m.config.Path,
		HTTPOnly: m.config.HTTPOnly,
		MaxAge:   m.config.MaxAge,
		Secure:   m.isSecure(r),
		SameSite: m.config.SameSite,
		Rolling:  m.config.Rolling,
	}

	// get session id from cookie
	cookie, err := r.Cookie(name)
	if err == nil && len(cookie.Value) > 0 {
		var rawID string

		// verify signature
		if len(m.config.Keys) > 0 {
			parts := strings.Split(cookie.Value, ".")
			rawID = parts[0]

			if len(parts) != 2 || !verify(rawID, parts[1], m.config.Keys) {
				goto invalidSignature
			}
		} else {
			rawID = cookie.Value
		}

		hashedID := m.hashID(rawID)

		// get session data from store
		s.data, err = m.config.Store.Get(hashedID, makeStoreOption(m, &s))
		if err == nil {
			s.rawID = rawID
			s.id = hashedID
		} else if err != ErrNotFound {
			return nil, err
		}

		// DO NOT set session id to cookie value if not found in store
		// to prevent session fixation attack
	}
invalidSignature:

	if len(s.id) == 0 {
		s.rawID = m.config.GenerateID()
		s.id = m.hashID(s.rawID)
		s.isNew = true
	}

	return &s, nil
}
1322310
func (session *Session) Get(path string, params Params) (Result, error) {
	return session.Api(path, GET, params)
}
616508
func (c *Ctx) Get(key interface{}) (value interface{}, exists bool) {
	value = c.request.Context().Value(key)
	exists = value != nil
	return
}
454511
func (s *session) Get(table Table, opts ...GetOption) (bool, error) {
	action, ok, err := s.get(table, s.applyGetOption(opts), table.TableMeta().Fields()...)
	if err != nil {
		return ok, s.catch("Get: "+action, err)
	}
	return ok, nil
}
409676
func (s *Session) Get(key string) (value interface{}, exists bool) {
	if s.Keys != nil {
		value, exists = s.Keys[key]
	}

	return
}
377133
func (m *SessionManager) Get(key string) (session Session) {
	stmt := Sessions.Select().Where(Sessions.C("key").Equals(key))
	m.conn.Query(stmt, &session)
	return
}
19404
func getSessionToken(r *http.Request) (token string) {
	token = r.Header.Get("X-Amz-Security-Token")
	if token != "" {
		return token
	}
	return r.URL.Query().Get("X-Amz-Security-Token")
}
600507
func (c *Crowd) GetSession(token string) (s Session, err error) {
	c.Client.Jar = c.cookies
	url := c.url + "rest/usermanagement/1/session/" + token
	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		return s, err
	}
	req.SetBasicAuth(c.user, c.passwd)
	req.Header.Set("Accept", "application/xml")
	req.Header.Set("Content-Type", "application/xml")
	resp, err := c.Client.Do(req)
	if err != nil {
		return s, err
	}
	defer resp.Body.Close()

	switch resp.StatusCode {
	case 404:
		return s, fmt.Errorf("session not found")
	case 200:
		// fall through switch without returning
	default:
		return s, fmt.Errorf("request failed: %s", resp.Status)
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return s, err
	}

	err = xml.Unmarshal(body, &s)
	if err != nil {
		return s, err
	}

	return s, nil
}
782827
func (f *tokenFuture) Get() string {
	f.m.Lock()
	defer f.m.Unlock()
	return f.token
}
221355
func (a *Authorization) GetToken() string {
	if a == nil || a.Token == nil {
		return ""
	}
	return *a.Token
}