Questions tagged [guardian]

Guardian is a token based authentication library for use with Elixir applications.

Guardian is a token based authentication library for use with Elixir applications.

Guardian remains a functional system. It integrates with Plug, but can be used outside of it. If you're implementing a TCP/UDP protocol directly, or want to utilize your authentication via channels in Phoenix, Guardian is your friend.

46 questions
0
votes
0 answers

Guardian pipeline unable to validate JWT

Hello I am trying to add use auth0 authentication with my API. I am able to take username and passwords and generate JWTs from auth0 with no problem and putting these in jwt.io I see that they are valid. However when I try to pass these tokens…
nate fishel
  • 47
  • 2
  • 5
0
votes
1 answer

ERROR: unable to find git executable in PATH/PATHEXT

My company asked us to install git guardian for security reason and as a part of installation I happened to do the following: Added the API key in the envionmental variables Added the pre-commit-config.yaml file in my root…
Uma
  • 11
0
votes
1 answer

Interbase 2020 crashes/loops

We use Interbase 2020 as production DB using UTF8 (approx 250 simultaneous user). With this database we have two main problems that we are not able to solve. In history we had a problem with an older udf-function that crashed our database because it…
0
votes
0 answers

How to get data from a specific ID from The Guardian API?

I want to get data from a specific id from The Guardian API. The documentation states that you just have to fetch this: https://content.guardianapis.com/business/2014/feb/18/uk-inflation-falls-below-bank-england-target You also have to include your…
Pedro L
  • 11
  • 2
0
votes
0 answers

What is configured as the "secret_key" in Guardian to verify an Azure AD Access Token JWT?

I have an SPA that is using Azure AD authentication to create ID and Access tokens. My intention is to use Guardian in my Elixir backend to verify that the tokens sent in the Authorization header are legitimate. Using the VerifyHeader Guardian Plug…
Abuelo
  • 199
  • 11
0
votes
1 answer

Django-rules replacement of guardian.mixins.PermissionListMixin

In my django based application I want to enable users to keep track of their locations. Each location has an owner, and the list view should only show the locations the current user owns. With django-guardian I was able to achieve the same with…
0
votes
1 answer

Guardian - exclude routes from needing authentication

Currently I have setup Guardian authentication with the following configuration: pipeline :api do plug :accepts, ["json"] plug MyApp.AuthAccessPipeline end defmodule MyApp.AuthAccessPipeline do use Guardian.Plug.Pipeline, otp_app: :my_app …
hyde
  • 2,525
  • 4
  • 27
  • 49
0
votes
1 answer

How to disable HTML view with django?

Imagine you are using django guardian for some object level restrictions. Now I have the following code; admin.py class ControlAdmin(GuardedModelAdmin): prepopulated_fields = {"description": ("title",)} list_display = ('title',…
Max
  • 493
  • 2
  • 9
0
votes
0 answers

Why won't Phoenix/Plug/Guardian recognize this CSRF token in AJAX calls?

Protected routes in my Phoenix API are sending 403 responses to requests. Debug logs show: (Plug.CSRFProtection.InvalidCSRFTokenError) invalid CSRF (Cross Site Request Forgery) token, please make sure that: * The session cookie is being sent and…
vaer-k
  • 10,923
  • 11
  • 42
  • 59
0
votes
1 answer

Override default current user to Guardian current user with Canary

I am trying to implement Canary into my application, and I have come across a problem. The docs (https://github.com/cpjk/canary#overriding-the-default-user) say that I need to have an Ecto record for the current user in conn.assigns.current_user.…
oriont
  • 684
  • 2
  • 10
  • 25
0
votes
2 answers

Get all articles Guardian API

I used guardian news api to fetch data. Then it documentation said, results are returned as paginated list of containing, by default, 10 entries per page. And I get output JSON as this. guardian documentation can find here { "response": { …
Chamith
  • 69
  • 10
0
votes
2 answers

Error in open.connection(con, "rb") : HTTP error 400 with R Studio

I want to get all articles on genome editing from the guardian api with R STudio. I tried some code and got several errors. data <- fromJSON("https://content.guardianapis.com/search?q=genome%20editing&show-…
Rapha Ast
  • 1
  • 1
  • 3
0
votes
1 answer

How can I refresh expired Guardian access token in Elixir

Is there the way to refresh Guardian access token, if the one is expired?
Vadym
  • 149
  • 1
  • 9
0
votes
2 answers

Guardian file don't let me generate the JWT token

I'm using {:guardian, "~> 1.0"} for my project to generate a token but it's giving me an error. Here's a code for my guardian file defmodule Dailyploy.Guardian do use Guardian, otp_app: :dailyploy def subject_for_token(user, _claims) do …
0
votes
1 answer

Guardian library can't able to generate the token

I'm creating an API for Signup/Sign in. I'm using guardian, "~> 1.0" to generate a jwt token for my signup. Now when I create a guardian module in my folder structure which I will show you in the code. I also passed the secret key in my cofig.ex.…