virtuatable-core 1.6.0.dev5 → 1.7.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c37ed6a8ec0a2a23b4ad7eecd2e875c102e30dd245607b949161d757335917b2
4
- data.tar.gz: 3ac1143c4174f372cc91c34399340742923a11132cfdff914f301993905682fe
3
+ metadata.gz: b330926b15e557e0b16d5858262fafd042d46f1cd4938fad4c012795bc1f6fc9
4
+ data.tar.gz: f07af3efd591fd82840e623ab0f414459d25a109cc04a24341409ee16d06cf94
5
5
  SHA512:
6
- metadata.gz: 981c8f5f7d41113ed22fe44a5187813d781a9ce5c75be0bcfaa5f2078f16958212b8064c982104ca55adff9e9c2c70e7cb407ebb45094ced051f1ea0a08154a6
7
- data.tar.gz: 212dd8eac364a4e113c0da59b13125962c2da476f8e84b5112dfa53493ab4e9349a6d6ad3c77dc0d51c3a870aaf1c39eeef558fe91292cef3d00c68ab45b7c04
6
+ metadata.gz: cf83681ed7f261af971a5f60671a14ab1e16173e7b754ee6ffe9fc8ae3eda64d7a28ea2cd09529fded0e71f7bfc2cd415b961cc65b222a2ed2d7b90b1b6f386d
7
+ data.tar.gz: 8f0e5d901df834b6f48a34e9371ba2d473afbf1790eca64727de70e2b9e3750aaf3a15ae2052c2babecc176cda463b972aa0e9b28e59a908f5dee7aab0ff5a01
@@ -8,6 +8,16 @@ module Core
8
8
  class Authorizations < Core::Services::Base
9
9
  include Singleton
10
10
 
11
+ # Creates an authorization to access to the data of the user for the application. The user is
12
+ # identified by the UUID of its current connection session.
13
+ # [WARNING] this method should NOT be used outside of the authentication backend.
14
+ #
15
+ # @param session_id [String] the unique identifier of the current session of the user.
16
+ # @param client_id [String] the unique public identifier of the application.
17
+ # @return [Code::Decorators::Authorization] the created authorization
18
+ #
19
+ # @raise [Core::Helpers::Errors::BadRequest] if any of the parameters is not given
20
+ # @raise [Core::Helpers::Errors::NotFound] if the session or the application is not found
11
21
  def create_from_session(session_id: nil, client_id: nil, **ignored)
12
22
  session = Core.svc.sessions.get_by_id(session_id: session_id)
13
23
  application = Core.svc.applications.get_by_id(client_id: client_id)
data/lib/core/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Core
4
- VERSION = '1.6.0.dev5'
4
+ VERSION = '1.7.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: virtuatable-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0.dev5
4
+ version: 1.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vincent Courtois
@@ -381,9 +381,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
381
381
  version: '0'
382
382
  required_rubygems_version: !ruby/object:Gem::Requirement
383
383
  requirements:
384
- - - ">"
384
+ - - ">="
385
385
  - !ruby/object:Gem::Version
386
- version: 1.3.1
386
+ version: '0'
387
387
  requirements: []
388
388
  rubygems_version: 3.2.3
389
389
  signing_key: