Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
Lazarus404 committed May 6, 2019
1 parent 7821567 commit 633902c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,22 @@ An authentication system with REST API to add users dynamically to the XTurn ser

Add this plugin to the XTurn mix file.

```
```elixir
{:xturn_simple_auth, git: "https://github.com/xirsys/xturn-simple-auth"}
```
Then, add the dep as an additional application in the apps list.

```elixir
def application() do
[
applications: [:crypto, :sasl, :logger, :ssl, :xmerl, :exts, :xturn_simple_auth],
```

### config/config.exs

Add the following to XTurn `config.exs` file.

```
```elixir
config :xturn, Xirsys.XTurn.SimpleAuth.Server,
adapter: Plug.Cowboy,
plug: Xirsys.XTurn.SimpleAuth.API,
Expand All @@ -33,7 +40,7 @@ Next, under the `pipes` section, replace all occurrances of `Xirsys.XTurn.Action

When running XTurn, you can add users by posting to the `/auth` endpoint on port 8880. The plugin will generate a username and password for you.

```
```json
{
"status": "ok",
"password": "05883c85065d19a9ee5742b91fcc80ba",
Expand Down
2 changes: 1 addition & 1 deletion lib/auth/client.ex
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ defmodule Xirsys.XTurn.SimpleAuth.Client do
# Interface functions
#########################################################################################################################

def start_link([]),
def start_link(),
do: GenServer.start_link(__MODULE__, [], name: __MODULE__)

def create_user(ns),
Expand Down
3 changes: 2 additions & 1 deletion lib/auth/supervisor.ex
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ defmodule Xirsys.XTurn.SimpleAuth.Supervisor do
require Logger

def start(_type, _args) do
import Supervisor.Spec
Logger.info("starting auth client")
children = [
worker(Xirsys.XTurn.SimpleAuth.Server, [])
worker(Xirsys.XTurn.SimpleAuth.Server, []),
worker(Xirsys.XTurn.SimpleAuth.Client, [])
]
opts = [strategy: :one_for_one, name: Xirsys.XTurn.SimpleAuth]
Expand Down

0 comments on commit 633902c

Please sign in to comment.