// SetAccessToken sets the AccessToken field's value.
767356
func (s *Credentials) SetAccessToken(v string) *Credentials {
	s.AccessToken = &v
	return s
}
55118
func (s *Stage) SetAccessLogSettings(v *AccessLogSettings) *Stage {
	s.AccessLogSettings = v
	return s
}
698313
func CreateAccessToken(c *context.APIContext, form api.CreateAccessTokenOption) {
	t := &models.AccessToken{
		UID:  c.User.ID,
		Name: form.Name,
	}
	if err := models.NewAccessToken(t); err != nil {
		c.Error(500, "NewAccessToken", err)
		return
	}
	c.JSON(201, &api.AccessToken{t.Name, t.Sha1})
}
466115
func (c *Client) SetToken(token string, tokenSecret string) {
	c.user = oauth1.NewToken(token, tokenSecret)
	c.client = nil
}
328415
func (s *Resource) SetAccessKeyDetails(v *AccessKeyDetails) *Resource {
	s.AccessKeyDetails = v
	return s
}
250872
func (s *Credentials) SetAccessTokenExpiration(v time.Time) *Credentials {
	s.AccessTokenExpiration = &v
	return s
}
1324506
func (c *Client) UpdateAccessTokenVersion(accessToken string) (resp UpdateAccessTokenVersionResponse, err error) {
	if accessToken == "" {
		return resp, errors.New("/item/access_token/update_version - access token must be specified")
	}

	jsonBody, err := json.Marshal(updateAccessTokenVersionRequest{
		ClientID:    c.clientID,
		Secret:      c.secret,
		AccessToken: accessToken,
	})

	if err != nil {
		return resp, err
	}

	err = c.Call("/item/access_token/update_version", jsonBody, &resp)
	return resp, err
}
895328
func (a *OAuthStrategy) AccessToken() string {
	a.mu.RLock()
	defer a.mu.RUnlock()

	return a.accessToken
}
1028078
func (s *GetDeviceInput) SetAccessToken(v string) *GetDeviceInput {
	s.AccessToken = &v
	return s
}
55486
func (s *GetAccessKeyLastUsedInput) SetAccessKeyId(v string) *GetAccessKeyLastUsedInput {
	s.AccessKeyId = &v
	return s
}
358137
func (oauth *Oauth) RefreshAccessToken(refreshToken string) (result ResAccessToken, err error) {
	urlStr := fmt.Sprintf(refreshAccessTokenURL, oauth.AppID, refreshToken)
	var response []byte
	response, err = util.HTTPGet(urlStr)
	if err != nil {
		return
	}
	err = json.Unmarshal(response, &result)
	if err != nil {
		return
	}
	if result.ErrCode != 0 {
		err = fmt.Errorf("GetUserAccessToken error : errcode=%v , errmsg=%v", result.ErrCode, result.ErrMsg)
		return
	}
	return
}
408489
func (a *OAuthStrategy) SetTokens(access, refresh string) {
	a.mu.Lock()
	defer a.mu.Unlock()

	a.accessToken = access
	a.refreshToken = refresh
}
1224261
func (m *MockAccessResponder) SetAccessToken(arg0 string) {
	m.ctrl.Call(m, "SetAccessToken", arg0)
}
772936
func (self *OAuth2Mixin) GetAccessToken(r *http.Request) (*oauth2.Token, error) {

	code := r.URL.Query().Get("code")
	if len(code) == 0 {
		return nil, errors.New("No Access Code in the Request URL")
	}

	accessToken, err := self.Client.GrantToken(code)
	if err != nil {
		return nil, err
	}

	return accessToken, err
}
646748
func (m *Manager) GetAccessToken(token string) (at *AccessToken, err error) {
	at = &AccessToken{}

	err = m.getAccessTokenCollection().Find(bson.M{"accesstoken": token}).One(at)
	if err != nil && err == mgo.ErrNotFound {
		at = nil
		err = nil
		return
	}
	if err != nil {
		at = nil
		return
	}
	if at.IsExpired() {
		at = nil
		err = nil
	}

	return
}
388264
func (s *VerifyUserAttributeInput) SetAccessToken(v string) *VerifyUserAttributeInput {
	s.AccessToken = &v
	return s
}
781673
func (s *AssociateSoftwareTokenInput) SetAccessToken(v string) *AssociateSoftwareTokenInput {
	s.AccessToken = &v
	return s
}