// UsingTravisToken will format and write provided
// travisToken in the AuthenticationService client's headers.
166849
func (as *AuthenticationService) UsingTravisToken(travisToken string) error {
	if travisToken == "" {
		return fmt.Errorf("unable to authenticate client; empty travis token provided")
	}

	as.client.Headers["Authorization"] = "token " + travisToken

	return nil
}
1276070
func (s *CreateReplicationGroupInput) SetAuthToken(v string) *CreateReplicationGroupInput {
	s.AuthToken = &v
	return s
}
433045
func (authHandler *unionAuthTokenHandler) AuthenticateToken(ctx context.Context, token string) (*authenticator.Response, bool, error) {
	var errlist []error
	for _, currAuthRequestHandler := range authHandler.Handlers {
		info, ok, err := currAuthRequestHandler.AuthenticateToken(ctx, token)
		if err != nil {
			if authHandler.FailOnError {
				return info, ok, err
			}
			errlist = append(errlist, err)
			continue
		}

		if ok {
			return info, ok, err
		}
	}

	return nil, false, utilerrors.NewAggregate(errlist)
}
1192633
func (s *GetDocumentPathInput) SetAuthenticationToken(v string) *GetDocumentPathInput {
	s.AuthenticationToken = &v
	return s
}
1302526
func UseTrait(names ...string) {
	var def dslengine.Definition

	switch typedDef := dslengine.CurrentDefinition().(type) {
	case *design.ResourceDefinition:
		def = typedDef
	case *design.ActionDefinition:
		def = typedDef
	case *design.AttributeDefinition:
		def = typedDef
	case *design.MediaTypeDefinition:
		def = typedDef
	default:
		dslengine.IncompatibleDSL()
	}

	if def != nil {
		for _, name := range names {
			if trait, ok := design.Design.Traits[name]; ok {
				dslengine.Execute(trait.DSLFunc, def)
			} else {
				dslengine.ReportError("unknown trait %s", name)
			}
		}
	}
}
960887
func HasAuthorizedToken(auth oauth2.Authenticator, r *http.Request) (oauth2.Principal, error) {
	ctx := r.Context()
	return auth.Validate(ctx, r)
}
1346800
func (s *DescribeCommentsInput) SetAuthenticationToken(v string) *DescribeCommentsInput {
	s.AuthenticationToken = &v
	return s
}
1194639
func (b BlockServerMeasured) RefreshAuthToken(ctx context.Context) {
	b.delegate.RefreshAuthToken(ctx)
}
1111856
func (s *CreateCommentInput) SetAuthenticationToken(v string) *CreateCommentInput {
	s.AuthenticationToken = &v
	return s
}
1177663
func (c *Client) AuthToken() (string, error) {
	var authToken string
	err := c.doGet("auth-token", func(r io.Reader) error {
		authTokenraw, err := ioutil.ReadAll(r)
		authToken = string(authTokenraw)
		return err
	})
	return authToken, err
}
800189
func (s *DeleteUserInput) SetAuthenticationToken(v string) *DeleteUserInput {
	s.AuthenticationToken = &v
	return s
}
1095213
func AuthToken(ctx context.Context) (*types.AuthToken, bool) {
	if v, ok := ctx.Value(AuthTokenKey).(*types.AuthToken); ok {
		return v, ok
	}
	return nil, false
}
1370795
func BearerToken(token string) runtime.ClientAuthInfoWriter {
	return runtime.ClientAuthInfoWriterFunc(func(r runtime.ClientRequest, _ strfmt.Registry) error {
		return r.SetHeaderParam("Authorization", "Bearer "+token)
	})
}
1241681
func (s *RemoveResourcePermissionInput) SetAuthenticationToken(v string) *RemoveResourcePermissionInput {
	s.AuthenticationToken = &v
	return s
}
889232
func JWTProviderWithAADToken(aadToken *adal.ServicePrincipalToken) JWTProviderOption {
	return func(config *TokenProviderConfiguration) error {
		config.aadToken = aadToken
		return nil
	}
}
1083807
func (m *MockRCHTTPClienter) SetAuthToken(arg0 string) {
	m.ctrl.Call(m, "SetAuthToken", arg0)
}
882255
func (e *endpointDetails) requestToken(w http.ResponseWriter, req *http.Request) {
	authReq := e.osinOAuthClient.NewAuthorizeRequest(osincli.CODE)
	oauthURL := authReq.GetAuthorizeUrl()

	http.Redirect(w, req, oauthURL.String(), http.StatusFound)
}