diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 145ff81..affde25 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -amvkLidWhIjst4LXj1FYVS0Mc5ExMpwJ9K8hjM+uzcZQS7cEOwKl4qzlMJrCjUDjozr8m4Fu5yk/b4aIWK8Fcex+MGiKVrQQTjhRBhMa8QKZALRvll5EqqpwYH7CMKp2gdftTYW3R0bqYTsjrx3cQZOawnrlZ2CHjwTPf/Bh2aWTJ7HiJ85+WxqR5Ruvx58qTEGbtb/SU89sfU1Nr055+IYNVx8oZU8Xt7K/RE4ztQargfRG3m4ocvbdDFhxPzCGwRO4fO+PivTyZVUmy6YnO7+cltwrmrii38GhlaYM+oExuhXPG3Vwpgcihr4HuP0+5WsAQpi1meervf+gF7jpbY0ry8emz0IiTjgX8ciDKqdocK8MTBVmV/IWheGe/Kjmu3kI1rFgYifEAg33B6vXKikxeRwyzCZounxh--HFs/irQ30nlBTrUW--S24D1htKeLCJpw8ElRIG5Q== \ No newline at end of file +Uo/A93FndDtT7v5seG9rdIwPYjyd91U7EL9NWGEhTGEi2HBNA0NJfvy1fIkINvB8s+UAt16KV2tbgAr5TIFSwD4tPvnBIqrCude+oo6BjSyNnQoafrFk1zqY/C3uujXN13ZRoz1mrWEY2tLk2GKTrNAjuM+na5J7nBSAyqvtLdYsKaIEm7kYSxpNwQit6YTaEXsqDxK4XZrmJs91XluqOBlSpkHmD3PEIc+dZLvbyR7Gy1bTPEW5Fpm7dpt/EOqJbBU2TOffgM8ECH1XIB+d25iTB8H4K4ccZftzIs7Zv0bF59ita8J6hIva8DgojiEYpO04kGjDjPaKiwEHWq64GnE4bIMYKkVI+65uOeOVuObmzv7FHJHbM2ERF6soXszrwtaReuPv7jc2OI1OQC3UIq+7z0NVI+SWbNzd--u8oxo8Nzn6pKrPrs--mKn5MOSieMIOGJHD8986Yg== \ No newline at end of file diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 145ff81..affde25 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -amvkLidWhIjst4LXj1FYVS0Mc5ExMpwJ9K8hjM+uzcZQS7cEOwKl4qzlMJrCjUDjozr8m4Fu5yk/b4aIWK8Fcex+MGiKVrQQTjhRBhMa8QKZALRvll5EqqpwYH7CMKp2gdftTYW3R0bqYTsjrx3cQZOawnrlZ2CHjwTPf/Bh2aWTJ7HiJ85+WxqR5Ruvx58qTEGbtb/SU89sfU1Nr055+IYNVx8oZU8Xt7K/RE4ztQargfRG3m4ocvbdDFhxPzCGwRO4fO+PivTyZVUmy6YnO7+cltwrmrii38GhlaYM+oExuhXPG3Vwpgcihr4HuP0+5WsAQpi1meervf+gF7jpbY0ry8emz0IiTjgX8ciDKqdocK8MTBVmV/IWheGe/Kjmu3kI1rFgYifEAg33B6vXKikxeRwyzCZounxh--HFs/irQ30nlBTrUW--S24D1htKeLCJpw8ElRIG5Q== \ No newline at end of file +Uo/A93FndDtT7v5seG9rdIwPYjyd91U7EL9NWGEhTGEi2HBNA0NJfvy1fIkINvB8s+UAt16KV2tbgAr5TIFSwD4tPvnBIqrCude+oo6BjSyNnQoafrFk1zqY/C3uujXN13ZRoz1mrWEY2tLk2GKTrNAjuM+na5J7nBSAyqvtLdYsKaIEm7kYSxpNwQit6YTaEXsqDxK4XZrmJs91XluqOBlSpkHmD3PEIc+dZLvbyR7Gy1bTPEW5Fpm7dpt/EOqJbBU2TOffgM8ECH1XIB+d25iTB8H4K4ccZftzIs7Zv0bF59ita8J6hIva8DgojiEYpO04kGjDjPaKiwEHWq64GnE4bIMYKkVI+65uOeOVuObmzv7FHJHbM2ERF6soXszrwtaReuPv7jc2OI1OQC3UIq+7z0NVI+SWbNzd--u8oxo8Nzn6pKrPrs--mKn5MOSieMIOGJHD8986Yg== \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index f5275d6..d08f69a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,4 +26,6 @@ config.active_support.disallowed_deprecation_warnings = [] config.active_record.migration_error = :page_load config.active_record.verbose_query_logs = true + + config.hosts << "lukas-eisenhauer.de" end diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 145ff81..affde25 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -amvkLidWhIjst4LXj1FYVS0Mc5ExMpwJ9K8hjM+uzcZQS7cEOwKl4qzlMJrCjUDjozr8m4Fu5yk/b4aIWK8Fcex+MGiKVrQQTjhRBhMa8QKZALRvll5EqqpwYH7CMKp2gdftTYW3R0bqYTsjrx3cQZOawnrlZ2CHjwTPf/Bh2aWTJ7HiJ85+WxqR5Ruvx58qTEGbtb/SU89sfU1Nr055+IYNVx8oZU8Xt7K/RE4ztQargfRG3m4ocvbdDFhxPzCGwRO4fO+PivTyZVUmy6YnO7+cltwrmrii38GhlaYM+oExuhXPG3Vwpgcihr4HuP0+5WsAQpi1meervf+gF7jpbY0ry8emz0IiTjgX8ciDKqdocK8MTBVmV/IWheGe/Kjmu3kI1rFgYifEAg33B6vXKikxeRwyzCZounxh--HFs/irQ30nlBTrUW--S24D1htKeLCJpw8ElRIG5Q== \ No newline at end of file +Uo/A93FndDtT7v5seG9rdIwPYjyd91U7EL9NWGEhTGEi2HBNA0NJfvy1fIkINvB8s+UAt16KV2tbgAr5TIFSwD4tPvnBIqrCude+oo6BjSyNnQoafrFk1zqY/C3uujXN13ZRoz1mrWEY2tLk2GKTrNAjuM+na5J7nBSAyqvtLdYsKaIEm7kYSxpNwQit6YTaEXsqDxK4XZrmJs91XluqOBlSpkHmD3PEIc+dZLvbyR7Gy1bTPEW5Fpm7dpt/EOqJbBU2TOffgM8ECH1XIB+d25iTB8H4K4ccZftzIs7Zv0bF59ita8J6hIva8DgojiEYpO04kGjDjPaKiwEHWq64GnE4bIMYKkVI+65uOeOVuObmzv7FHJHbM2ERF6soXszrwtaReuPv7jc2OI1OQC3UIq+7z0NVI+SWbNzd--u8oxo8Nzn6pKrPrs--mKn5MOSieMIOGJHD8986Yg== \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index f5275d6..d08f69a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,4 +26,6 @@ config.active_support.disallowed_deprecation_warnings = [] config.active_record.migration_error = :page_load config.active_record.verbose_query_logs = true + + config.hosts << "lukas-eisenhauer.de" end diff --git a/config/routes.rb b/config/routes.rb index 8c140be..a861b51 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,11 +1,15 @@ +def doRoutes(root) + post root+'users/authenticate', to: 'api/users#authenticate' + post root+'users/presalt', to: 'api/users#presalt' + post root+'users/checkToken', to: 'api/users#checkToken' + post root+'users/changePassword', to: 'api/users#changePassword' + post root+'users/postStatus', to: 'api/users#postStatus' + get root+'users/status', to: 'api/users#status' + post root+'users/updateQuote', to: 'api/users#updateQuote' + get root+'users/quotes', to: 'api/users#quotes' +end + Rails.application.routes.draw do - @root = 'api/' - post @root+'users/authenticate' - post @root+'users/presalt' - post @root+'users/checkToken' - post @root+'users/changePassword' - post @root+'users/postStatus' - get @root+'users/status', to: 'api/users#status' - post @root+'users/updateQuote' - get @root+'users/quotes', to: 'api/users#quotes' + root = 'api/' + doRoutes("") end diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 145ff81..affde25 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -amvkLidWhIjst4LXj1FYVS0Mc5ExMpwJ9K8hjM+uzcZQS7cEOwKl4qzlMJrCjUDjozr8m4Fu5yk/b4aIWK8Fcex+MGiKVrQQTjhRBhMa8QKZALRvll5EqqpwYH7CMKp2gdftTYW3R0bqYTsjrx3cQZOawnrlZ2CHjwTPf/Bh2aWTJ7HiJ85+WxqR5Ruvx58qTEGbtb/SU89sfU1Nr055+IYNVx8oZU8Xt7K/RE4ztQargfRG3m4ocvbdDFhxPzCGwRO4fO+PivTyZVUmy6YnO7+cltwrmrii38GhlaYM+oExuhXPG3Vwpgcihr4HuP0+5WsAQpi1meervf+gF7jpbY0ry8emz0IiTjgX8ciDKqdocK8MTBVmV/IWheGe/Kjmu3kI1rFgYifEAg33B6vXKikxeRwyzCZounxh--HFs/irQ30nlBTrUW--S24D1htKeLCJpw8ElRIG5Q== \ No newline at end of file +Uo/A93FndDtT7v5seG9rdIwPYjyd91U7EL9NWGEhTGEi2HBNA0NJfvy1fIkINvB8s+UAt16KV2tbgAr5TIFSwD4tPvnBIqrCude+oo6BjSyNnQoafrFk1zqY/C3uujXN13ZRoz1mrWEY2tLk2GKTrNAjuM+na5J7nBSAyqvtLdYsKaIEm7kYSxpNwQit6YTaEXsqDxK4XZrmJs91XluqOBlSpkHmD3PEIc+dZLvbyR7Gy1bTPEW5Fpm7dpt/EOqJbBU2TOffgM8ECH1XIB+d25iTB8H4K4ccZftzIs7Zv0bF59ita8J6hIva8DgojiEYpO04kGjDjPaKiwEHWq64GnE4bIMYKkVI+65uOeOVuObmzv7FHJHbM2ERF6soXszrwtaReuPv7jc2OI1OQC3UIq+7z0NVI+SWbNzd--u8oxo8Nzn6pKrPrs--mKn5MOSieMIOGJHD8986Yg== \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index f5275d6..d08f69a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,4 +26,6 @@ config.active_support.disallowed_deprecation_warnings = [] config.active_record.migration_error = :page_load config.active_record.verbose_query_logs = true + + config.hosts << "lukas-eisenhauer.de" end diff --git a/config/routes.rb b/config/routes.rb index 8c140be..a861b51 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,11 +1,15 @@ +def doRoutes(root) + post root+'users/authenticate', to: 'api/users#authenticate' + post root+'users/presalt', to: 'api/users#presalt' + post root+'users/checkToken', to: 'api/users#checkToken' + post root+'users/changePassword', to: 'api/users#changePassword' + post root+'users/postStatus', to: 'api/users#postStatus' + get root+'users/status', to: 'api/users#status' + post root+'users/updateQuote', to: 'api/users#updateQuote' + get root+'users/quotes', to: 'api/users#quotes' +end + Rails.application.routes.draw do - @root = 'api/' - post @root+'users/authenticate' - post @root+'users/presalt' - post @root+'users/checkToken' - post @root+'users/changePassword' - post @root+'users/postStatus' - get @root+'users/status', to: 'api/users#status' - post @root+'users/updateQuote' - get @root+'users/quotes', to: 'api/users#quotes' + root = 'api/' + doRoutes("") end diff --git a/db/seeds.rb b/db/seeds.rb index 0d52f85..a381d01 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -15,6 +15,6 @@ end createUser('admin', 'changeme', true) -createUser('lukas', 'test', false) +createUser('lukas', 'test', true) Authority.create(name:`hostname`.tr("\n", ''), signature: Rails.application.credentials.secret_key_base) -Authority.create(name: 'thirdParty', signature: 'thirdPartyKKey') + diff --git a/Gemfile b/Gemfile index ea05a23..e311bd4 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source "https://rubygems.org" git_source(:github) { |repo| "https://github.com/#{repo}.git" } -ruby "2.7.2" +ruby ">=2.6.2" gem "rails", "~> 7.0.2", ">= 7.0.2.3" gem "sqlite3", "~> 1.4" diff --git a/Gemfile.lock b/Gemfile.lock index 6090e83..d9e3746 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -91,6 +91,7 @@ marcel (1.0.2) method_source (1.0.0) mini_mime (1.1.2) + mini_portile2 (2.8.0) minitest (5.15.0) msgpack (1.4.5) net-imap (0.2.3) @@ -108,6 +109,9 @@ net-protocol timeout nio4r (2.5.8) + nokogiri (1.13.3) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) nokogiri (1.13.3-x86_64-linux) racc (~> 1.4) puma (5.6.4) @@ -159,6 +163,7 @@ zeitwerk (2.5.4) PLATFORMS + ruby x86_64-linux DEPENDENCIES diff --git a/config/credentials.yml.enc b/config/credentials.yml.enc index 145ff81..affde25 100644 --- a/config/credentials.yml.enc +++ b/config/credentials.yml.enc @@ -1 +1 @@ -amvkLidWhIjst4LXj1FYVS0Mc5ExMpwJ9K8hjM+uzcZQS7cEOwKl4qzlMJrCjUDjozr8m4Fu5yk/b4aIWK8Fcex+MGiKVrQQTjhRBhMa8QKZALRvll5EqqpwYH7CMKp2gdftTYW3R0bqYTsjrx3cQZOawnrlZ2CHjwTPf/Bh2aWTJ7HiJ85+WxqR5Ruvx58qTEGbtb/SU89sfU1Nr055+IYNVx8oZU8Xt7K/RE4ztQargfRG3m4ocvbdDFhxPzCGwRO4fO+PivTyZVUmy6YnO7+cltwrmrii38GhlaYM+oExuhXPG3Vwpgcihr4HuP0+5WsAQpi1meervf+gF7jpbY0ry8emz0IiTjgX8ciDKqdocK8MTBVmV/IWheGe/Kjmu3kI1rFgYifEAg33B6vXKikxeRwyzCZounxh--HFs/irQ30nlBTrUW--S24D1htKeLCJpw8ElRIG5Q== \ No newline at end of file +Uo/A93FndDtT7v5seG9rdIwPYjyd91U7EL9NWGEhTGEi2HBNA0NJfvy1fIkINvB8s+UAt16KV2tbgAr5TIFSwD4tPvnBIqrCude+oo6BjSyNnQoafrFk1zqY/C3uujXN13ZRoz1mrWEY2tLk2GKTrNAjuM+na5J7nBSAyqvtLdYsKaIEm7kYSxpNwQit6YTaEXsqDxK4XZrmJs91XluqOBlSpkHmD3PEIc+dZLvbyR7Gy1bTPEW5Fpm7dpt/EOqJbBU2TOffgM8ECH1XIB+d25iTB8H4K4ccZftzIs7Zv0bF59ita8J6hIva8DgojiEYpO04kGjDjPaKiwEHWq64GnE4bIMYKkVI+65uOeOVuObmzv7FHJHbM2ERF6soXszrwtaReuPv7jc2OI1OQC3UIq+7z0NVI+SWbNzd--u8oxo8Nzn6pKrPrs--mKn5MOSieMIOGJHD8986Yg== \ No newline at end of file diff --git a/config/environments/development.rb b/config/environments/development.rb index f5275d6..d08f69a 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -26,4 +26,6 @@ config.active_support.disallowed_deprecation_warnings = [] config.active_record.migration_error = :page_load config.active_record.verbose_query_logs = true + + config.hosts << "lukas-eisenhauer.de" end diff --git a/config/routes.rb b/config/routes.rb index 8c140be..a861b51 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,11 +1,15 @@ +def doRoutes(root) + post root+'users/authenticate', to: 'api/users#authenticate' + post root+'users/presalt', to: 'api/users#presalt' + post root+'users/checkToken', to: 'api/users#checkToken' + post root+'users/changePassword', to: 'api/users#changePassword' + post root+'users/postStatus', to: 'api/users#postStatus' + get root+'users/status', to: 'api/users#status' + post root+'users/updateQuote', to: 'api/users#updateQuote' + get root+'users/quotes', to: 'api/users#quotes' +end + Rails.application.routes.draw do - @root = 'api/' - post @root+'users/authenticate' - post @root+'users/presalt' - post @root+'users/checkToken' - post @root+'users/changePassword' - post @root+'users/postStatus' - get @root+'users/status', to: 'api/users#status' - post @root+'users/updateQuote' - get @root+'users/quotes', to: 'api/users#quotes' + root = 'api/' + doRoutes("") end diff --git a/db/seeds.rb b/db/seeds.rb index 0d52f85..a381d01 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -15,6 +15,6 @@ end createUser('admin', 'changeme', true) -createUser('lukas', 'test', false) +createUser('lukas', 'test', true) Authority.create(name:`hostname`.tr("\n", ''), signature: Rails.application.credentials.secret_key_base) -Authority.create(name: 'thirdParty', signature: 'thirdPartyKKey') + diff --git a/lib/JWT.rb b/lib/JWT.rb index 23b261b..238e059 100644 --- a/lib/JWT.rb +++ b/lib/JWT.rb @@ -23,8 +23,8 @@ def toString string = Base64.urlsafe_encode64(@header.to_json).tr('=', '') + '.' + Base64.urlsafe_encode64(@data.to_json) .tr('=', '') - string = string + '.' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), - Rails.application.credentials.secret_key_base, string).tr('=', '') + string << '.' + OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('sha256'), + Rails.application.credentials.secret_key_base, string).tr('=', '') return string end -end \ No newline at end of file +end