// GrantScope mocks base method
188988
func (m *MockRequester) GrantScope(arg0 string) {
	m.ctrl.Call(m, "GrantScope", arg0)
}
261812
func IsScopeMissingError(err error) bool {
	cause := errors.Cause(err)
	if kvErr, ok := cause.(KeyValueError); ok && kvErr.KVError() {
		return kvErr.StatusCode() == int(gocbcore.StatusScopeUnknown)
	}

	return false
}
60907
func (s *OAuth2Storage) isValidScope(scope string) error {
	scopes := strings.Split(scope, " ")
	for _, s := range scopes {
		parts := strings.Split(s, ":")
		if len(parts) != 2 {
			return errors.New("Scope (" + s + ") has invalid format. The valid format is: scope:[read,write]")
		}
		if !utils.InSlice(parts[0], Configuration.Scopes) {
			return errors.New("Requested scope (" + s + ") does not exist")
		}
		rw := strings.Split(parts[1], ",")
		for _, permission := range rw {
			if permission != "read" && permission != "write" {
				return errors.New("Invalid permission: " + permission + ". Allowed: read,write")
			}
		}
	}
	return nil
}
256051
func (c *Connector) CreateScope(ctx context.Context, md *dosa.ScopeMetadata) error {
	if c.Next == nil {
		return NewErrNoMoreConnector()
	}
	return c.Next.CreateScope(ctx, md)
}
147460
func (mr *MockAdminClientMockRecorder) DropScope(arg0, arg1 interface{}) *gomock.Call {
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DropScope", reflect.TypeOf((*MockAdminClient)(nil).DropScope), arg0, arg1)
}
915113
func ScopeCheck(name string, scopes ...string) func(tc *ginoauth2.TokenContainer, ctx *gin.Context) bool {
	glog.Infof("ScopeCheck %s configured to grant access for scopes: %v", name, scopes)
	configuredScopes := scopes
	return func(tc *ginoauth2.TokenContainer, ctx *gin.Context) bool {
		scopesFromToken := make([]string, 0)
		for _, s := range configuredScopes {
			if cur, ok := tc.Scopes[s]; ok {
				glog.V(2).Infof("Found configured scope %s", s)
				scopesFromToken = append(scopesFromToken, s)
				ctx.Set(s, cur) // set value from token of configured scope to the context, which you can use in your application.
			}
		}
		//Getting the uid for identification of the service calling
		if cur, ok := tc.Scopes["uid"]; ok {
			ctx.Set("uid", cur)
		}
		return len(scopesFromToken) > 0
	}
}
531212
func (m *MockRequester) GrantAudience(arg0 string) {
	m.ctrl.Call(m, "GrantAudience", arg0)
}
163409
func (v *Vars) OpenScope(th *starlark.Thread) {
	v.scopes = append(v.scopes, &scope{thread: th})
}
1276508
func NewMockAuthorizeCodeStrategy(ctrl *gomock.Controller) *MockAuthorizeCodeStrategy {
	mock := &MockAuthorizeCodeStrategy{ctrl: ctrl}
	mock.recorder = &MockAuthorizeCodeStrategyMockRecorder{mock}
	return mock
}
1356839
func (s *CreateRouteInput) SetAuthorizationScopes(v []*string) *CreateRouteInput {
	s.AuthorizationScopes = v
	return s
}
612373
func (s *ListPoliciesInput) SetScope(v string) *ListPoliciesInput {
	s.Scope = &v
	return s
}
898092
func (m *GormRoleScopeRepository) LoadByScope(ctx context.Context, ID uuid.UUID) ([]RoleScope, error) {
	return m.Query(RoleScopeFilterByScope(ID))
}
248308
func NewEventScope() app.EventScope {
	return app.EventScope(&EventScope{
		eventsCallbacks: make(map[int][]app.EventCallback),
	})
}
127290
func GetScopestringFromJWT(token *jwt.Token) (scopestring string) {
	if token == nil {
		return
	}
	scopes := GetScopesFromJWT(token)
	scopestring = strings.Join(scopes, ",")
	return
}
383903
func (m *MockAuthorizeRequester) GrantAudience(arg0 string) {
	m.ctrl.Call(m, "GrantAudience", arg0)
}
1204367
func (m *MockAuthorizeRequester) SetRequestedScopes(arg0 fosite.Arguments) {
	m.ctrl.Call(m, "SetRequestedScopes", arg0)
}
968285
func (s *PutMethodInput) SetAuthorizationScopes(v []*string) *PutMethodInput {
	s.AuthorizationScopes = v
	return s
}