{"id":4057,"date":"2016-12-30T12:23:32","date_gmt":"2016-12-30T12:23:32","guid":{"rendered":"https:\/\/www.botreetechnologies.com\/blog\/?p=4057"},"modified":"2021-09-13T17:58:56","modified_gmt":"2021-09-13T12:28:56","slug":"authenticate-using-stormpath-in-a-ruby-on-rails-application","status":"publish","type":"post","link":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/","title":{"rendered":"Authenticate using Stormpath in a Ruby on Rails App"},"content":{"rendered":"\n<p>Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?<\/p>\n\n\n\n<p>Stormpath can help you easily integrate highly secure user management, authentication and authorization to your applications.<\/p>\n\n\n\n<p>Stormpath provides REST API for integration and wrappers for all popular languages\/platforms. In this tutorial, we will see how to setup Stormpath application and integrate it in a <a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\" target=\"_blank\" rel=\"noreferrer noopener\">Ruby on Rails application<\/a>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Setup Rails Application<\/h2>\n\n\n\n<p><b>Create rails new application<\/b><\/p>\n\n\n\n<p><code>$ rails new StormpathApp<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>$ cd StormpathApp<\/p><\/blockquote>\n\n\n\n<p><b>Add <a href=\"https:\/\/github.com\/stormpath\/stormpath-rails\" target=\"_blank\" rel=\"noopener noreferrer\">stormpath-rails<\/a> gem in <i>Gemfile<\/i><\/b><\/p>\n\n\n\n<p><code>gem 'stormpath-rails'<\/code><\/p>\n\n\n\n<p>and run bundle from command line from the application home directory<\/p>\n\n\n\n<p><code>$ bundle<\/code><\/p>\n\n\n\n<p><b>Generate Stormpath supported files<\/b><\/p>\n\n\n\n<p><code>$ rails generate strompath:install<\/code><\/p>\n\n\n\n<p>This will insert the config yaml file and the neccessary controller and view modules.<\/p>\n\n\n\n<p>If you want to override views which in most case would be, use generator to create copy of views in your application<\/p>\n\n\n\n<p><code>$ rails generate stormpath:views<\/code><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Setup Stormpath account<\/h3>\n\n\n\n<p>Lets us first sign up on Stormpath and sign in to create an application there.<\/p>\n\n\n\n<p><b>Application<\/b><\/p>\n\n\n\n<p>Click on Applications Tab to see all the applications.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application-1024x477.png\" alt=\"Click on Applications Tab\" class=\"wp-image-13919\" width=\"768\" height=\"358\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application-1024x477.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application-300x140.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application-768x358.png 768w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application-1536x715.png 1536w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/application.png 1855w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p>By default it give two applications pretreated. But let us create our own application.<\/p>\n\n\n\n<p>Click on the Create Application button and add details required.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication-1024x447.png\" alt=\"Click on the Create Application button\" class=\"wp-image-13920\" width=\"768\" height=\"335\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication-1024x447.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication-300x131.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication-768x335.png 768w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication-1536x670.png 1536w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/create-apllication.png 1856w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p>Click on the Accounts menu to see all accounts(users) created. For now you will be the one only.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu-1024x192.png\" alt=\"Click on the Accounts menu\" class=\"wp-image-13921\" width=\"768\" height=\"144\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu-1024x192.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu-300x56.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu-768x144.png 768w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu-1536x288.png 1536w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/accounts-menu.png 1853w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p>Click on your name to view your account details and find API keys section at bottom of the page.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details-1024x567.png\" alt=\"account details\" class=\"wp-image-13922\" width=\"768\" height=\"425\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details-1024x567.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details-300x166.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details-768x425.png 768w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details-1536x850.png 1536w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/account-details.png 1855w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p><i>Click on Create API Key<\/i> button to get API key with secret which we need to authenticate from Rails application. It will prompt you to download a file to having API Key id and secret.<\/p>\n\n\n\n<p><b>Create configuration<\/b><\/p>\n\n\n\n<p>Create local_env.yml file in config and add this code<\/p>\n\n\n\n<p><code>STORMPATH_CLIENT_APIKEY_ID: XXXXXXXXXXXXXXXXXXXXX<\/code><\/p>\n\n\n\n<p><code>STORMPATH_CLIENT_APIKEY_SECRET: XXXXXXXXXXXXXXXXXXXX<\/code><\/p>\n\n\n\n<p><code>STORMPATH_APPLICATION_HREF: https:\/\/api.stormpath.com\/v1\/XXXX<\/code><\/p>\n\n\n\n<p>Also add this code in <i>application.rb<\/i> to load above environment variable while rails environment is loading<\/p>\n\n\n\n<p><code>config.before_configuration do<\/code><\/p>\n\n\n\n<p><code>env_file = File.join(Rails.root, 'config', 'local_env.yml')<\/code><\/p>\n\n\n\n<p><code>YAML.load(File.open(env_file)).each do |key, value|<\/code><\/p>\n\n\n\n<p><code>ENV[key.to_s] = value<\/code><br><code>end if File.exists?(env_file)<\/code><\/p>\n\n\n\n<p><code>end<\/code><\/p>\n\n\n\n<p><b>Configure config\/stormpath.yml<\/b><\/p>\n\n\n\n<p><code>stormpath:<\/code><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p>application:<\/p><p>href: &lt;%= ENV[&#8216;STORMPATH_APPLICATION_HREF&#8217;] %&gt;<\/p><p>name: null<\/p><\/blockquote>\n\n\n\n<p><b>Add routes<\/b><\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>Rails.application.routes.draw do<\/code><\/p><p>stormpath_rails_routes()<\/p><p>end<\/p><\/blockquote>\n\n\n\n<p>If you want to override the controller then you have to write routes as actions in params of stormpath_rails_routes() method.<\/p>\n\n\n\n<p>Useful helper methods<\/p>\n\n\n\n<p>Using the stormpath rails gem, we get following helpers to be used in controller as well as views<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>current_account &#8211; get the current account<\/li><li>signed_in? &#8211; check if the user is signed in.<\/li><li>require_authentication! &#8211; Generally used in before_filter to check if user is required to be authenticated before calling specific actions.<\/li><li>require_no_authentication! &#8211; Opposite to require_authentication! access (a logged in user shouldn&#8217;t be able to see the login form).<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Create Welcome page for your rails application<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>$ rails g controller home<\/code><\/p><\/blockquote>\n\n\n\n<p>Add show method in <i>home_controller.rb<\/i> for welcome page view.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>class HomeController &lt; ApplicationController<\/code><\/p><p>before_action :require_authentication!<\/p><p>def show<\/p><p>end<\/p><p>end<\/p><\/blockquote>\n\n\n\n<p>Let&#8217;s add login\/logout link in show.html.erb.<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>&lt;% if signed_in? %&gt;<\/code><\/p><p>&lt;h3&gt; Hello, &lt;%= current_account.full_name %&gt; &lt;\/h3&gt;<\/p><p>&lt;%= link_to &#8220;Logout&#8221;, logout_path, method: :post %&gt;<\/p><p>&lt;% else %&gt;<\/p><p>&lt;%= link_to &#8220;Login&#8221;, new_login_path %&gt;<\/p><p>&lt;% end %&gt;<\/p><\/blockquote>\n\n\n\n<p>Add routes to show home page<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>root :to =&gt; 'home#show'<\/code><\/p><\/blockquote>\n\n\n\n<p>Finally, <b>Start up your rails server<\/b>:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\"><p><code>$ rails s<\/code><\/p><\/blockquote>\n\n\n\n<p>Open your browser and navigate to http:\/\/localhost:3000<\/p>\n\n\n\n<p>You should be able to see following screen. Create an account and come back to home to sign in.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"686\" height=\"391\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/log-in.png\" alt=\"home to sign in\" class=\"wp-image-13923\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/log-in.png 686w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/log-in-300x171.png 300w\" sizes=\"auto, (max-width: 686px) 100vw, 686px\" \/><\/figure><\/div>\n\n\n\n<p>After successfully sign in, you should see page with user&#8217;s name and logout link like below<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"619\" height=\"182\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/logout.png\" alt=\"logout\" class=\"wp-image-13924\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/logout.png 619w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/logout-300x88.png 300w\" sizes=\"auto, (max-width: 619px) 100vw, 619px\" \/><\/figure><\/div>\n\n\n\n<p>You can verify users from your <i>Stormpath Applications &gt; StormpathApp<\/i> on Accounts tab.<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications-1024x300.png\" alt=\"Stormpath Applications\" class=\"wp-image-13925\" width=\"768\" height=\"225\" srcset=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications-1024x300.png 1024w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications-300x88.png 300w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications-768x225.png 768w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications-1536x450.png 1536w, https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/12\/stormpath-applications.png 1855w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/figure><\/div>\n\n\n\n<p>Hope you enjoyed! Happy reading!<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><a href=\"https:\/\/www.botreetechnologies.com\/ruby-on-rails-development\"><strong><b>Click here for more<\/b> details&#8230;<\/strong><\/a><\/p>\n\n\n\n<p>At <a href=\"https:\/\/www.botreetechnologies.com\/\">BoTree Technologies<\/a>, we build enterprise applications with our <a href=\"https:\/\/www.botreetechnologies.com\/hire-ruby-on-rails-developers\" target=\"_blank\" rel=\"noopener noreferrer\">RoR team<\/a> of 25+ engineers.<\/p>\n\n\n\n<p>We also specialize in Python, RPA, AI, Django, JavaScript and ReactJS.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><a href=\"https:\/\/www.botreetechnologies.com\/contact\">Consulting is free<\/a> &#8211; let us help you grow!<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Do you want to focus on your core applications and&#8230;<\/p>\n","protected":false},"author":15,"featured_media":13928,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[73,10],"tags":[],"class_list":["post-4057","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ruby-on-rails","category-technology"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.2 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Authenticate using Stormpath in a Ruby on Rails App<\/title>\n<meta name=\"description\" content=\"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Authenticate using Stormpath in a Ruby on Rails App\" \/>\n<meta property=\"og:description\" content=\"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\" \/>\n<meta property=\"og:site_name\" content=\"BoTree Technologies\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/BoTreeTechnologies\/\" \/>\n<meta property=\"article:published_time\" content=\"2016-12-30T12:23:32+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-13T12:28:56+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"683\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Prina Patel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:site\" content=\"@BoTreeTech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prina Patel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\"},\"author\":{\"name\":\"Prina Patel\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104\"},\"headline\":\"Authenticate using Stormpath in a Ruby on Rails App\",\"datePublished\":\"2016-12-30T12:23:32+00:00\",\"dateModified\":\"2021-09-13T12:28:56+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\"},\"wordCount\":606,\"commentCount\":0,\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg\",\"articleSection\":[\"Ruby on Rails\",\"Technology\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\",\"name\":\"Authenticate using Stormpath in a Ruby on Rails App\",\"isPartOf\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg\",\"datePublished\":\"2016-12-30T12:23:32+00:00\",\"dateModified\":\"2021-09-13T12:28:56+00:00\",\"author\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104\"},\"description\":\"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?\",\"breadcrumb\":{\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg\",\"width\":1024,\"height\":683,\"caption\":\"Stormpath in a Ruby on Rails Application\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.botreetechnologies.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authenticate using Stormpath in a Ruby on Rails App\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#website\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/\",\"name\":\"BoTree Technologies\",\"description\":\"Committed to inspire generation.\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104\",\"name\":\"Prina Patel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png\",\"url\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png\",\"contentUrl\":\"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png\",\"caption\":\"Prina Patel\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Authenticate using Stormpath in a Ruby on Rails App","description":"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/","og_locale":"en_US","og_type":"article","og_title":"Authenticate using Stormpath in a Ruby on Rails App","og_description":"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?","og_url":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/","og_site_name":"BoTree Technologies","article_publisher":"https:\/\/www.facebook.com\/BoTreeTechnologies\/","article_published_time":"2016-12-30T12:23:32+00:00","article_modified_time":"2021-09-13T12:28:56+00:00","og_image":[{"width":1024,"height":683,"url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg","type":"image\/jpeg"}],"author":"Prina Patel","twitter_card":"summary_large_image","twitter_creator":"@BoTreeTech","twitter_site":"@BoTreeTech","twitter_misc":{"Written by":"Prina Patel","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#article","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/"},"author":{"name":"Prina Patel","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104"},"headline":"Authenticate using Stormpath in a Ruby on Rails App","datePublished":"2016-12-30T12:23:32+00:00","dateModified":"2021-09-13T12:28:56+00:00","mainEntityOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/"},"wordCount":606,"commentCount":0,"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg","articleSection":["Ruby on Rails","Technology"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/","url":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/","name":"Authenticate using Stormpath in a Ruby on Rails App","isPartOf":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage"},"image":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage"},"thumbnailUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg","datePublished":"2016-12-30T12:23:32+00:00","dateModified":"2021-09-13T12:28:56+00:00","author":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104"},"description":"Do you want to focus on your core applications and get to market faster without worrying about authentication, authorization and security?","breadcrumb":{"@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#primaryimage","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2016\/12\/stormpath-rest-api.jpg","width":1024,"height":683,"caption":"Stormpath in a Ruby on Rails Application"},{"@type":"BreadcrumbList","@id":"https:\/\/www.botreetechnologies.com\/blog\/authenticate-using-stormpath-in-a-ruby-on-rails-application\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.botreetechnologies.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Authenticate using Stormpath in a Ruby on Rails App"}]},{"@type":"WebSite","@id":"https:\/\/www.botreetechnologies.com\/blog\/#website","url":"https:\/\/www.botreetechnologies.com\/blog\/","name":"BoTree Technologies","description":"Committed to inspire generation.","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.botreetechnologies.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.botreetechnologies.com\/blog\/#\/schema\/person\/1e6294444428608e617c78b2a0b16104","name":"Prina Patel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png","url":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png","contentUrl":"https:\/\/www.botreetechnologies.com\/blog\/wp-content\/uploads\/2020\/10\/prina-patel-150x150.png","caption":"Prina Patel"}}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/4057","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/comments?post=4057"}],"version-history":[{"count":4,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/4057\/revisions"}],"predecessor-version":[{"id":16301,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/posts\/4057\/revisions\/16301"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media\/13928"}],"wp:attachment":[{"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/media?parent=4057"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/categories?post=4057"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.botreetechnologies.com\/blog\/wp-json\/wp\/v2\/tags?post=4057"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}