ssk_line 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ssk_line.rb +2 -5
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a758de8729859df4405a9c522a65ba35c8bf98f507a8ebdd8dbd5feed4c1e49
|
4
|
+
data.tar.gz: 85b8ef830d4d07d428918a590783c14b62439e891c499964213a384a9e3d2c96
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a643381c9b3175770c67ae6381a3a1a2a73f1bb7d93c4d3d996b315d4bd0b66dc26dd7ee218a72bea4c9c344e1ae3528bdefb08b15e73e97ae66a3363703f84a
|
7
|
+
data.tar.gz: bfd0a8f8620e9e4692e681e6acea3d3e496d81a31abca328605b0620411cfdf5bd91ed835b86eed830668e0a8e07685d78e23e37d39b6800b20c3fcb5c15e1e8
|
data/lib/ssk_line.rb
CHANGED
@@ -9,21 +9,18 @@ module SskLine
|
|
9
9
|
'https://access.line.me/oauth2/v2.1/authorize?response_type=code&client_id='+ENV['LINEAPI_CHANNEL_ID']+'&redirect_uri='+ENV['LINEAPI_CALLBACK_URL']+'&state='+request.session[:line_csrf]+'&scope=profile%20openid'
|
10
10
|
end
|
11
11
|
|
12
|
+
#最低限の設定がされているかのチェック
|
12
13
|
def self.status_check(request,controller,user_class)
|
13
14
|
request.flash[:danger]=''
|
14
15
|
self.env_key_check(request,'LINEAPI_CHANNEL_ID')
|
15
16
|
self.env_key_check(request,'LINEAPI_CALLBACK_URL')
|
16
|
-
self.env_key_check(request,'
|
17
|
+
self.env_key_check(request,'LINEAPI_CHANNEL_SECRET')
|
17
18
|
self.instance_method_check(request,user_class,:teacher)
|
18
19
|
self.instance_method_check(request,user_class,:admin)
|
19
20
|
self.instance_method_check(request,user_class,:lineid)
|
20
21
|
self.instance_method_check(request,user_class,:dname)
|
21
22
|
self.instance_method_check(request,user_class,:picture)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
23
|
if request.flash[:danger].length > 0 then return false else return true end
|
26
|
-
|
27
24
|
end
|
28
25
|
|
29
26
|
def self.instance_method_check(request,user_class,key)
|