Questions tagged [authentication]

Authentication is the process of determining whether someone or something is, in fact, who or what it is declared to be.

49 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7
votes
0answers
528 views

Let's register that Django user

Short intro So, I've been using Django for a while now and thought it would be nice to start a simple application. In an ideal World, each app must have a way of letting its users register and that's ...
5
votes
0answers
874 views

OAuth2 login for ASP.NET Core without local accounts

I am using OAuth2 for users to sign in with their Google Account and authenticate Google API requests. I have not used the built-in ASP.NET Identity provider because this requires an app database of ...
4
votes
1answer
292 views

Notify user of credential failure and make another attempt

The below code works because of the do operator on line 24. Is there a more functional way to get the test to pass, or would you consider this an appropriate use of ...
3
votes
0answers
72 views

Django authentication against Exchange server

I wrote an authentication app for Django and my worry is primarily about the security of my app. My Django authentication app uses exchangelib to authenticate ...
3
votes
2answers
144 views

Simple single-file PHP login system

This is something that I initially came up with to protect a bunch of scripts on my personal webserver, but am now planning on using with a few public projects too. ...
3
votes
0answers
378 views

PyCrypto AES-CFB with SCrypt and HMAC

I am brushing up on my Python, and since I would like to learn a bit about encryption, I figured I would give PyCrypto a try. I obviously wouldn't implement encryption in any production environment, ...
3
votes
0answers
2k views

Routes requiring authentication in react

I'm looking for a way to do some route protection with react-router-4. Looking at an example in the documentation, they create a Component which is rendered like this: ...
3
votes
0answers
1k views

Validating HMAC-SHA256 signature in Python

I am trying to implement HMAC-SHA256 authentication into my Python RESTful API project. I am using Python Eve (built on top of Flask), started with an simplified HMAC-SHA1 example. My application is ...
3
votes
0answers
107 views

Rbac Principal with Binding support

I've been maintaining a Rbac helper for some time now. My goal is to provide an easy way to tell the following: When does an user have a role What can a user do (...
3
votes
0answers
14k views

JWT - Simple API example

I have created this fake API just because I want to learn how to use JWT. It is a simple unsigned token exchange with two methods call: login and adminPassword. I've used https://github.com/lcobucci/...
3
votes
0answers
57 views

PL/pgSQL autologin token generation

Here's an excerpt from my migration script for my database for the new "remember me" login option for my web application. Logging in with a valid username/password combination (authenticate_user) ...
3
votes
0answers
3k views

Authorization token from servlet filter stores user name

I'm having some difficulty with servlet and filter lifecycles. The intention here is to use the front controller pattern with a simple login; authentication is accomplished with the filter. Am I ...
3
votes
0answers
897 views

Testing Scala code which depends on objects

I am writing a small oauth2 library for Play! 2.1 scala. As I am still learning I got stuck trying to TDD and ended up writing the code first, then refactoring for testability. By testability I mean ...
2
votes
0answers
34 views

Middleware for authenticating GitHub webhooks

I'm currently working on a PSR-15 middleware for authenticating GitHub webhooks. ...
2
votes
0answers
39 views

Laravel testing for compatibility between old and new password-hashing schemes

I currently have an event listener tied to Laravel's Attempting class. The listener is designed to rehash an old password to something newer. The current DB stores ...
2
votes
0answers
28 views

WordPress rest api basic auth with IP check

I'd like to use basic auth with the WordPress API, but restrict the capability to a single IP address. I've updated the existing code from here: https://github.com/WP-API/Basic-Auth accordingly. It ...
2
votes
0answers
60 views

Firebase login/registration process for a dating app

I am developing another bigger project, I want to try a simple DatingApp and currently I try to develop a Login and Registration Form. There is no special register / login button, the code will later ...
2
votes
0answers
32 views

Saving OAuth2 credentials to database with SQLAlchemy

I'm writing web application that uses Google Proximity Beacon API to interact with beacon data. In order to access that data, I need to grant access to use beacons' information for my web application ...
2
votes
0answers
184 views

PHP Login Checker Stage

I have been working on my script which allows people to sign-up and login to my website. I was wondering if someone could review the code. It works but I can't help but feel it could be optimized. ...
2
votes
0answers
1k views

Keycloak js adapter

We are using Keycloak v4.4.0 as SSO for multiple microservices and SPAs. The main goal is to prevent user entering his credentials when landing to another SPA UI. I've not worked with such ...
2
votes
0answers
1k views

PHP login script using mysqli

Can you guys tell me if my login is secure? Login.php ...
2
votes
0answers
403 views

Change the identity from Azure AD to identity of application and return new token

I use this code to change the identity coming from Azure AD in an identity usable by my application, then i generate a token for this identity and return it in the response headers. Is this secure? ...
2
votes
0answers
23 views

Login Controller follow-up

I was wondering if this class can be refactored to be more efficient. I've taken tips from other people who have already helped me refactor it a fair amount, but I was wondering if there was any last ...
2
votes
0answers
77 views

Web Security with Authentication Key in Query String

What is the best way to authenticate using a key in a query string? I have a web service that clients can consume if they provide a authentication key in the query string. I also have a web front-...
2
votes
0answers
261 views

Steam Auth for Laravel

I'm not expert on OpenID, so i don't know if my package is correct and safe. I've realized that after login on Steam community, take about 2/3 seconds to return to my page. It's my issue or is from ...
2
votes
0answers
197 views

Checking authentication status by looking for a cookie

I'm an Android newbie. I have this function in my code: ...
2
votes
0answers
71 views

Authentication terminology

Below comes a Value Object to represent UserId in ASP.NET application. It implements Value Identity, so equality is defined by matching of the state calculated at ...
2
votes
0answers
54 views

Function to prevent sign-in form from being spammed

I have written a function that I want to protect from spam bots. I have used two techniques the first being filter after submit. After reading around I obtained the ...
2
votes
0answers
65 views

Rewriting authentication controller using promises

I am in the process of refactoring some complex code that uses callbacks to instead use promises. I am trying to figure out if my proposed approaches make sense. ...
2
votes
0answers
56 views

Online store for pies - Part 2: User authentication

I'm building an angular application using AngularJS and AngularFire. As this is the second part of this "series" it might be a good idea to also check out part 1 to gain an even better overview of the ...
2
votes
0answers
632 views

Social user login

This is my first Laravel package. It uses hybrid Auth package to authenticate users using their social network accounts. It can retrieve information to store in a local database. Its purpose is to ...
1
vote
0answers
8 views

Setting the token for API client generated instances in an Angular application

The context I am developing an Angular application who also consumes an external REST API. I am also trying the OpenAPI generator using a TypeScript template. The OK path is the following: call a ...
1
vote
0answers
16 views

Precompiled templates with initializators (factory pattern) or single interface and method or what else?

PROBLEM I'm trying to use authboss (https://github.com/volatiletech/authboss) with quicktemplate (https://github.com/valyala/quicktemplate). The authboss rendering system is defined by one interface:...
1
vote
0answers
400 views

Implementation of Private Route with Auth using react-router and Context API

I'm trying to implement safe routes and checking if the user is authorized using only Context API. I'm also trying to avoid that the user can see a PrivateRoute, ...
1
vote
0answers
199 views

Make API request with Access Token and Refresh

I have a class that makes API requests for a mobile app. The code can be making multiple API requests at the same time. But, if the request is unauthorized, I want to refresh the access token. While ...
1
vote
0answers
623 views

React + Django (session) authentication

Is authentication implemented correctly? At the entry point to the app, which is App.js, query the Django server, which responds whether the current user is ...
1
vote
0answers
19 views

Angular2 “Logged In State Watcher”

I have a small website I'm working on as a hobby and I created a login page/home page so far. I wanted to get the basic login/logout functionality going before filling out the main part of my site. ...
1
vote
0answers
67 views

Subscribing to multiple sources in RxJava

I have used RxJava to Observe multiple sources and then perform action depending upon values of Observables. I want to know if it can be further simplified. Goal: Complete implementation of RxJava. ...
1
vote
0answers
380 views

ASP.NET Core basic login implementation

I'm fairly new to ASP.NET Core, I've used webforms for years so I naturally want to cling to things I did with webforms. The following code works, but I'm wondering if it can be cleaned up with ...
1
vote
0answers
51 views

Authenticating voting

My aim is to prevent authenticated users from voting more than once. I am using angularfire2. The code gives me the expected behavior and I was wondering the better way of doing this. The ...
1
vote
0answers
586 views

Spring controller for login using Facebook or email

I've got a spring controller class which handles the user logins. I've got two endpoints: /user/facebook /user/email You can ...
1
vote
0answers
67 views

Simple login script

This is a simple login script using Bcrypt. Is there anything wrong with this code? It works and my page loads O.K, but could this be optimized for better speeds? ...
1
vote
0answers
481 views

Login authentication model

I have made my model global so that I can work only a model with several controllers. Is it good or bad practice? And according to this, is my login process secure? Login check function in Controller:...
1
vote
0answers
69 views

Front-end login system

After some googling for about 2 days, I am here with a simple wordpress front-end login system. Please let me know if there is anything wrong with it, or if there is anything I can do, for improving ...
1
vote
0answers
438 views

Implementing a login client

I have a lot of functions in this class to implement a login client. How do I modularize it ? ...
0
votes
1answer
30 views

Python classes to grab HTTP response from website entities

I am trying to implement a parent WebContent class and child classes to grab HTTP responses from the actual website entities. There are highlevel codes below and I ...
0
votes
0answers
21 views

Authentication and auto renewal of an API Token

Following is an https call to retrieve the token, once it's retrieved, it's cached. Callers call the addTokenObserver method that sets a timer based on the token ...
0
votes
0answers
75 views

Forgot password / Reset password

I have a working example of 2 methods: Forgot password: A user inserts an account number and an email => An email is sent to the user right after it creates a token in the database. Validate Reset ...
-1
votes
1answer
56 views

Login to a school system and get account type

I'm new to MySQL database design. My question is this database is correctly built or not. We used the users table to login and get account type and here the code to login ...