Skip to content

Commit

Permalink
Add some logging
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrián Quintás committed May 30, 2018
1 parent a9e240f commit ecbb1e3
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Add to dependencies

```elixir
def deps do
[{:server_utils, "~> 0.3.0"}]
[{:server_utils, "~> 0.3.1"}]
end
```

Expand Down
3 changes: 3 additions & 0 deletions lib/plugs/session/jwt_session.ex
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ defmodule ServerUtils.Plugs.Session.JwtSession do
import Plug.Conn

alias ServerUtils.Parsers.Jwt, as: JwtParser
alias ServerUtils.SentryLogger

@authorization_header "authorization"

Expand All @@ -30,9 +31,11 @@ defmodule ServerUtils.Plugs.Session.JwtSession do
put_private(conn, :server_utils, private)
else
{:error, _} ->
SentryLogger.info("Unable to parse claims from jwt: #{jwt}")
send_unauthorized_response(conn)
end
else
SentryLogger.debug("Header for authorization not found: #{@authorization_header}")
send_unauthorized_response(conn)
end
end
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ defmodule ServerUtils.Mixfile do
@moduledoc false
use Mix.Project

@version "0.3.0"
@version "0.3.1"

def project do
[
Expand Down

0 comments on commit ecbb1e3

Please sign in to comment.