monban-core 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/CHANGELOG/1.0.0.md +10 -0
- data/Gemfile.lock +1 -1
- data/README.md +20 -0
- data/lib/monban/core.rb +13 -0
- data/lib/monban/core/version.rb +1 -1
- data/lib/monban/use_case/account/change/email.rb +2 -1
- data/lib/monban/use_case/account/change/login_id.rb +2 -1
- data/lib/monban/use_case/account/change/roles.rb +2 -1
- data/lib/monban/use_case/account/fetch.rb +2 -1
- data/lib/monban/use_case/account/register.rb +2 -1
- data/lib/monban/use_case/account/search.rb +2 -1
- data/lib/monban/use_case/account/unregister.rb +2 -1
- data/lib/monban/use_case/auth/account.rb +2 -1
- data/lib/monban/use_case/auth/change/authy.rb +2 -1
- data/lib/monban/use_case/auth/token/authy.rb +2 -1
- data/lib/monban/use_case/auth/token/full.rb +2 -1
- data/lib/monban/use_case/auth/token/general.rb +2 -1
- data/lib/monban/use_case/auth/token/renew.rb +2 -1
- data/lib/monban/use_case/auth/token/reset.rb +2 -1
- data/lib/monban/use_case/auth/verify/authy.rb +2 -1
- data/lib/monban/use_case/auth/verify/password.rb +2 -1
- data/lib/monban/use_case/auth/verify/reset_token.rb +2 -1
- metadata +4 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7139cb2cdb21c64c525723323b230c10b195eae4e4d899a157123981b6b6318b
|
4
|
+
data.tar.gz: 413baa5f6ad69041cfe45692b893116796702f64f99d2ae287f9de32e257e76c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c0d2c76fdd6dfb2a52bedfd69792b2be6d077ba6fa6323ccebbd20489b34389bbbf334988332f69d10f5a44e20065819095aebb7f66a69fa1fd62e4b593dd2fc
|
7
|
+
data.tar.gz: 875b6f9482d571726e4af505f2ebbb48bc8b373f0305e0fb846fb410c618f4af8ad7b41c29b2556141461856fc4999e4b13c59ffad9015b6f6f3ce23b5b660db
|
data/CHANGELOG.md
ADDED
data/CHANGELOG/1.0.0.md
ADDED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -22,6 +22,26 @@ The authentication plugin for web api based on jwt
|
|
22
22
|
<a id="Usage"></a>
|
23
23
|
## Usage
|
24
24
|
|
25
|
+
### Errors
|
26
|
+
|
27
|
+
`error` class should be respond to below methods
|
28
|
+
|
29
|
+
```ruby
|
30
|
+
module Monban
|
31
|
+
module Core
|
32
|
+
ERRORS = [
|
33
|
+
:invalid_account!,
|
34
|
+
:invalid_login!,
|
35
|
+
:invalid_params!,
|
36
|
+
:not_found!,
|
37
|
+
:renew_token_expired!,
|
38
|
+
:conflict!,
|
39
|
+
:server_error!,
|
40
|
+
]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
```
|
44
|
+
|
25
45
|
## Install
|
26
46
|
|
27
47
|
Add this line to your application's Gemfile:
|
data/lib/monban/core.rb
ADDED
data/lib/monban/core/version.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class Email < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
time: [:now],
|
14
15
|
repository: [
|
15
16
|
:transaction,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class LoginId < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
time: [:now],
|
14
15
|
repository: [
|
15
16
|
:transaction,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class Roles < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
time: [:now],
|
14
15
|
repository: [
|
15
16
|
:transaction,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -8,7 +9,7 @@ module Monban
|
|
8
9
|
class Fetch < Base
|
9
10
|
|
10
11
|
initialize_with(
|
11
|
-
error:
|
12
|
+
error: Monban::Core::ERRORS,
|
12
13
|
repository: [
|
13
14
|
:login_id,
|
14
15
|
:reset_password_email,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -8,7 +9,7 @@ module Monban
|
|
8
9
|
class Register < Base
|
9
10
|
|
10
11
|
initialize_with(
|
11
|
-
error:
|
12
|
+
error: Monban::Core::ERRORS,
|
12
13
|
time: [:now],
|
13
14
|
repository: [
|
14
15
|
:transaction,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class Search < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
repository: [:search],
|
14
15
|
|
15
16
|
limit: Integer,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -8,7 +9,7 @@ module Monban
|
|
8
9
|
class Unregister < Base
|
9
10
|
|
10
11
|
initialize_with(
|
11
|
-
error:
|
12
|
+
error: Monban::Core::ERRORS,
|
12
13
|
repository: [
|
13
14
|
:transaction,
|
14
15
|
:account_exists?,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -8,7 +9,7 @@ module Monban
|
|
8
9
|
class Account < Base
|
9
10
|
|
10
11
|
initialize_with(
|
11
|
-
error:
|
12
|
+
error: Monban::Core::ERRORS,
|
12
13
|
time: [:now],
|
13
14
|
|
14
15
|
account: ::Hash,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class Authy < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
time: [:now],
|
14
15
|
authy: [:register_user],
|
15
16
|
repository: [
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
require "monban/use_case/auth/token"
|
3
4
|
|
@@ -11,7 +12,7 @@ module Monban
|
|
11
12
|
include Token::Helper
|
12
13
|
|
13
14
|
initialize_with(
|
14
|
-
error:
|
15
|
+
error: Monban::Core::ERRORS,
|
15
16
|
logger: [:log],
|
16
17
|
time: [:now],
|
17
18
|
token: [:create],
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
require "monban/use_case/auth/token"
|
3
4
|
|
@@ -11,7 +12,7 @@ module Monban
|
|
11
12
|
include Token::Helper
|
12
13
|
|
13
14
|
initialize_with(
|
14
|
-
error:
|
15
|
+
error: Monban::Core::ERRORS,
|
15
16
|
logger: [:log],
|
16
17
|
time: [:now],
|
17
18
|
token: [:create],
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "getto/initialize_with"
|
2
3
|
|
3
4
|
require "monban/use_case/auth/token/full"
|
@@ -11,7 +12,7 @@ module Monban
|
|
11
12
|
include Getto::InitializeWith
|
12
13
|
|
13
14
|
initialize_with(
|
14
|
-
error:
|
15
|
+
error: Monban::Core::ERRORS,
|
15
16
|
login: Symbol,
|
16
17
|
full: Full,
|
17
18
|
authy: Authy,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
require "monban/use_case/auth/token"
|
3
4
|
|
@@ -11,7 +12,7 @@ module Monban
|
|
11
12
|
include Token::Helper
|
12
13
|
|
13
14
|
initialize_with(
|
14
|
-
error:
|
15
|
+
error: Monban::Core::ERRORS,
|
15
16
|
logger: [:log],
|
16
17
|
time: [:now],
|
17
18
|
token: [:create],
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
require "monban/use_case/auth/token"
|
3
4
|
|
@@ -11,7 +12,7 @@ module Monban
|
|
11
12
|
include Token::Helper
|
12
13
|
|
13
14
|
initialize_with(
|
14
|
-
error:
|
15
|
+
error: Monban::Core::ERRORS,
|
15
16
|
time: [:now],
|
16
17
|
logger: [:log],
|
17
18
|
token: [:create],
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -9,7 +10,7 @@ module Monban
|
|
9
10
|
class Authy < Base
|
10
11
|
|
11
12
|
initialize_with(
|
12
|
-
error:
|
13
|
+
error: Monban::Core::ERRORS,
|
13
14
|
authy: [:verify],
|
14
15
|
repository: [
|
15
16
|
:authy_id,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -10,7 +11,7 @@ module Monban
|
|
10
11
|
include Getto::InitializeWith
|
11
12
|
|
12
13
|
initialize_with(
|
13
|
-
error:
|
14
|
+
error: Monban::Core::ERRORS,
|
14
15
|
repository: [
|
15
16
|
:account_id_by_login_id,
|
16
17
|
:password_salt,
|
@@ -1,3 +1,4 @@
|
|
1
|
+
require "monban/core"
|
1
2
|
require "monban/use_case/base"
|
2
3
|
|
3
4
|
require "getto/params"
|
@@ -10,7 +11,7 @@ module Monban
|
|
10
11
|
include Getto::InitializeWith
|
11
12
|
|
12
13
|
initialize_with(
|
13
|
-
error:
|
14
|
+
error: Monban::Core::ERRORS,
|
14
15
|
time: [:now],
|
15
16
|
repository: [
|
16
17
|
:valid_reset_password_token?,
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: monban-core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shun@getto.systems
|
@@ -122,11 +122,14 @@ files:
|
|
122
122
|
- ".gitignore"
|
123
123
|
- ".gitlab-ci.yml"
|
124
124
|
- ".travis.yml"
|
125
|
+
- CHANGELOG.md
|
126
|
+
- CHANGELOG/1.0.0.md
|
125
127
|
- Gemfile
|
126
128
|
- Gemfile.lock
|
127
129
|
- LICENSE
|
128
130
|
- README.md
|
129
131
|
- Rakefile
|
132
|
+
- lib/monban/core.rb
|
130
133
|
- lib/monban/core/version.rb
|
131
134
|
- lib/monban/domain/auth.rb
|
132
135
|
- lib/monban/domain/password.rb
|