Skip to content

Commit ca85fd4

Browse files
committed
Use code instead of _italics_ for file names
1 parent 71494e8 commit ca85fd4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

content/guides/basics-of-authentication.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ is set to `http://localhost:4567`. Let's fill in the callback URL as `http://loc
3131

3232
## Accepting user authorization
3333

34-
Now, let's start filling out our simple server. Create a file called _server.rb_ and paste this into it:
34+
Now, let's start filling out our simple server. Create a file called `server.rb` and paste this into it:
3535

3636
require 'sinatra'
3737
require 'rest-client'
@@ -47,7 +47,7 @@ Your client ID and client secret keys come from [your application's configuratio
4747
GitHub--or any other public place, for that matter. We recommend storing them as
4848
[environment variables][about env vars]--which is exactly what we've done here.
4949

50-
Next, in _views/index.erb_, paste this content:
50+
Next, in `views/index.erb`, paste this content:
5151

5252

5353
<html>
@@ -77,7 +77,7 @@ the app. Let's fix that now!
7777

7878
### Providing a callback
7979

80-
In _server.rb_, add a route to specify what the callback should do:
80+
In `server.rb`, add a route to specify what the callback should do:
8181

8282
get '/callback' do
8383
# get temporary GitHub code...
@@ -104,7 +104,7 @@ the logged in user:
104104

105105
erb :basic, :locals => {:auth_result => auth_result}
106106

107-
We can do whatever we want with our results. In this case, we'll just dump them straight into _basic.erb_:
107+
We can do whatever we want with our results. In this case, we'll just dump them straight into `basic.erb`:
108108

109109
<p>Okay, here's a JSON dump:</p>
110110
<p>
@@ -128,7 +128,7 @@ into our Sinatra app. On top of that, we're going to be using a middleware calle
128128
[sinatra-auth-github][sinatra auth github] (which was written by a GitHubber).
129129
This will make authentication transparent to the user.
130130

131-
After you run `gem install sinatra_auth_github`, create a file called _advanced_server.rb_,
131+
After you run `gem install sinatra_auth_github`, create a file called `advanced_server.rb`,
132132
and paste these lines into it:
133133

134134
require 'sinatra/auth/github'
@@ -196,7 +196,7 @@ we're establishing them through the `:github_options` symbol. Passing your clien
196196
and client secret, and calling `register Sinatra::Auth::Github`, is everything you need
197197
to simplify your authentication.
198198

199-
We must also create a _config.ru_ config file, which Rack will use for its configuration
199+
We must also create a `config.ru` config file, which Rack will use for its configuration
200200
options:
201201

202202
ENV['RACK_ENV'] ||= 'development'
@@ -207,7 +207,7 @@ options:
207207

208208
run Example::MyBasicApp
209209

210-
Next, create a file in _views_ called _advanced.erb_, and paste this markup into it:
210+
Next, create a file in `views` called `advanced.erb`, and paste this markup into it:
211211

212212
<html>
213213
<head>
@@ -221,10 +221,10 @@ From the command line, call `rackup -p 4567`, which starts up your
221221
Rack server on port `4567`--the same port we used when we had a simple Sinatra app.
222222
When you navigate to `http://localhost:4567`, the app calls `authenticate!`--another
223223
internal `sinatra-auth-github` method--which redirects you to `/callback`. `/callback`
224-
then sends us back to `/`, and since we've been authenticated, renders _advanced.erb_.
224+
then sends us back to `/`, and since we've been authenticated, renders `advanced.erb`.
225225

226226
We could completely simplify this roundtrip routing by simply changing our callback
227-
URL in GitHub to `/`. But, since both _server.rb_ and _advanced.rb_ are relying on
227+
URL in GitHub to `/`. But, since both `server.rb` and `advanced.rb` are relying on
228228
the same callback URL, we've got to do a little bit of wonkiness to make it work.
229229

230230
Also, if we had never authorized this Rack application to access our GitHub data,

0 commit comments

Comments
 (0)