Questions tagged [scopes]

An OAuth Scope is a permission setting that limits the permissiveness of a given OAuth Token. Clients therefore provide a list of desired Scopes when obtaining a Token (alongside standard OAuth ClientId and Client Authentication details). The Token will then be granted (or not) according to the Authentication process and the Scopes granted for the given Client Id

383 questions
1
vote
1 answer

Laravel prevent adding too many additional relations

I have a model called Transfer and a model called Account, and two relations in my Transfer model: public function outgoing() { return $this->belongsTo(Account::class, 'outgoing_id'); } public function incoming() { return…
Hardist
  • 2,098
  • 11
  • 49
  • 85
1
vote
0 answers

Auth0: How can I get all scopes in rule?

I have create some test-api in Auth0 and added some scopes to there, like "read:users, create:users" and else. When I create some rule for this api, I want to obtain in this rule all list of scopes, which I have added. Screenshot of code Is it…
1
vote
1 answer

How do scopes and arrays in Java work?

I am usually programming in C++ and just started to write some easier programs for SPOJ to practice programming in Java. I am making Hangman game where I initialize array to visualize current game state. At start you type how many times you want to…
Advent
  • 140
  • 15
1
vote
0 answers

Python global variable contradiction

for some reason the variable "a" in the main function changes after the function call. In spite of the fact that "a" doesn't even change within the function. Although even if it did, such changes should not affect its value outside the function,…
Moe
  • 11
  • 1
1
vote
1 answer

Laravel passport, add scopes based on the role of the user

I'm currently building a SPA type of application prototype. The first step is to implement an API with Laravel Passport and secure it. For that, I'm taking inspiration of this existing structure : Laravel SPA. The problem is that, none of the API…
Zero
  • 443
  • 1
  • 7
  • 23
1
vote
3 answers

Accessing variables from within a function within a class (scopes?)

I'm fairly new with classes, and I've been looking online for some kind of tutorial on this, but unfortunately I've been unsuccessful at finding a solution. Any help you guys could give me would be much appreciated. I have 2 files. 1)…
Jay
  • 1,084
  • 4
  • 18
  • 43
1
vote
0 answers

Laravel: Combining multiple query scopes on nested relationships without overriding the previous ones

I've got the following database structure for an online learning platform: A course consists of modules. A module consists of lessons and tasks. There are user specific information for each of these elements with the respective relationships defined…
timavo
  • 73
  • 9
1
vote
1 answer

Understanding JavaScript scopes

I'm trying to understand how scopes work in JS. Can you tell me if I correct with understanding of this chunk of code: for(var i = 0; i<5; i++){ setTimeout(function timeoutHandler() { var i = i; console.log(i); //undefined }) } console.log…
1
vote
1 answer

What scopes are neccesary to access GMail contacts via carddav?

In the limited Google CardDAV Documentation, located here the following is mentioned Client applications must use HTTPS, and OAuth 2.0 authentication must be provided for the user's Google account. The CardDAV server will not authenticate a request…
Matt Kagan
  • 611
  • 1
  • 12
  • 24
1
vote
2 answers

Rails / Multi-Tenancy: Conditional default scope based on a different model's db value / global setting?

I've got a Rails application that is multi-tenant. Every model has an account_id, belongs to an account, and has a default scope to a current account id: class Derp < ApplicationRecord default_scope { where(account_id: Account.current_id) } …
Greg Blass
  • 3,523
  • 29
  • 42
1
vote
1 answer

Spring JWT : How to map user permissions to accesstoken scopes

I have a question concerning the mapping of my user permissions to access token scopes in spring JWT, in fact, when i map all user permissions to the accestoken scopes, and when I want to test this in my WS by @PreAuthorize("hasRole('ROLE_USER') and…
DrDray
  • 55
  • 5
1
vote
1 answer

Applying additional oauth scopes in an omniauth initializer

I am trying to apply the coinbase wallet API with oauth to use its send functionality. I have been able to connect to the API and use its endpoints, but whenever I try to use the send functionality, I am thrown the error Invalid amount for…
d00medman
  • 191
  • 3
  • 15
1
vote
1 answer

Scope character limit hit when generating OAuth tokens

We are using WS02 1.90 and have encountered an issue with a character length limit on the scope value that can assigned against tokens generated behind scenes. For example, we have 39 scopes added across 60 API end points configured in…
mindparse
  • 6,115
  • 27
  • 90
  • 191
1
vote
1 answer

Laravel 5.4 Global scopes applied to Model boot results in Class "xxxx" not found in [Model boot method]

I have created a global scope following Laravel 5.4 documentation for Eloquent Laravel=>eloquent=>queryScopes Scope name I defined is "TenantScope" Filename "TenantScope.php" in "app\Scopes" folder
Muhammad Ali
  • 418
  • 6
  • 20
1
vote
0 answers

OAuth best practices - DB design when users belong to several apps

I am designing a RESTful API which will serve as common backend for several mobile apps. So far, it consists of: Users table: id (primary), name, email, password Apps table: id (primary), name, description Just independent tables... I want to…
andcl
  • 3,342
  • 7
  • 33
  • 61