w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
Firebase & Backbone: Application Authentication
There's fundamentally no way to guarantee security on the client side. A smart hacker can always get around any restrictions you place on the GUI (such as setting @logged to true). Instead, you need to set up security rules on the Firebase side so that non-authenticated users can't change data they're not supposed. This way, even if a hacker messes with your GUI they can't actually access or change anything they're not supposed to. There's an overview of Firebase auth and security rules here: https://www.firebase.com/docs/security-quickstart.html

Categories : Javascript

email/password authentication for firebase SERVER_ERROR
The problem you're seeing is that the network request for the login methods are failing since you're navigating away from the current page before they can complete. The form is actually being submitted, and the page is redirecting / refreshing as a result. In order to prevent this behavior, update your code to include a return false; at the bottom of each of the $(element).submit() methods, which will prevent the form from submitting and the authentication requests will complete. $("#el").submit(function() { // Do stuff here ... return false; });

Categories : Javascript

Firebase JWT Authentication, Continually Send Token?
Future calls to Firebase within the same page will utilize the same authentication. From the docs: Authenticating on any reference will authenticate that client to the entire Firebase, and Firebase will seamlessly handle authenticating again if its internet connection is ever lost, so you'll only need to perform the operation once in your app. To change a client's credentials (for example, when a user logs in to a different account), simply re-authenticate with a new token. var ref = new Firebase(URL); ref.on('value', ...) // not authenticated ref.auth(TOKEN, function(error) { if( !error ) { ref.on('value', ...); //authenticated ref.child('...').on('value', ...); //also authenticated new Firebase(URL); // also authenticated if I'm using the same URL } });

Categories : Authentication

Get Firebase child nodes' names without getting their children too in Firebase response?
UPDATE: There is now a shallow command in the REST API that will fetch just the keys for a path. This has not been added to the SDKs yet. In Firebase, you can't obtain a list of node names without retrieving the data underneath. Not yet anyways. The performance problems can be addressed with normalization. Essentially, your goal is to split data into consumable chunks. Store your list of video keys, possible with a couple meta fields like title, etc, in one path, and store the bulk content somewhere else. For example: /video_meta/id/link, title, ... /video_lines/id/... To learn more about denormalizing, check out this article: https://www.firebase.com/blog/2013-04-12-denormalizing-is-normal.html

Categories : Javascript

Firebase transaction does not update actual value in the Firebase DB
The problem was not in the transaction() itself but in the fact that I have bound the parent object of the 'price' - Auction to my local scope variable: angularFire(travelBidsFirebaseRef + "/auction/" + $scope.auctionId, $scope, 'auction', {}); Right before the transaction to update 'price' is triggered, I update another property - 'endDate' of the bound Auction object: $scope.auction.endDate = new Date(millis).toUTCString(); This line of code triggers the update of the whole Auction object, including 'price'. I expected that only the 'endDate' property will be updated. This king of code creates racing condition where my 'price' update is overriden right after the commit and the collback returns not what I was expecting. It's important to understand what exactly data is being syncr

Categories : Javascript

JBoss 7.1 Database based JAAS authentication - authentication failed
It worked after I commented out the below statements which was appearing as default in standalone.xml. <security-domain name="other" cache-type="default"> <login-module code="Remoting" flag="optional"> <module-option name="password-stacking" value="useFirstPass"/> </login-module> <login-module code="RealmDirect" flag="required"> <module-option name="password-stacking" value="useFirstPass"/> </login-module>

Categories : Java

SSHAuthenticationExcetion :No suitable authentication method found to complete authentication
Normally No suitable authentication method found to complete authentication is used is returned from an SSH server when the server does not allow authentication by the offered methods by the client. The SSH server could only allow public key authentication, or some form of two factor authentication in turn preventing password authentication. Download an SSH client like Putty and try to connect to the server directly and see what the result is.

Categories : Vb.Net

authentication failure for "/": Password Mismatch in apache radius authentication
I have not dug very deeply into this, but I have observed the Password Mismatch error (it's actually error # AH01617 ) when the method of encoding a password does not match how the password is encoded on the end authenticating system. In your case, Apache will solicit, using AuthType Basic, a password in plain text with Basic Authentication. I was not able to locate documentation on the AddRadiusAuth directive that you use, but if you specify that the idea encryption algorithm is used on your Radius authenticating server, then this definitely does not match how the passwords were originally solicited to be sent (Basic Auth). I will not put money on this since I can't find documentation for AddRadiusAuth, but it looks like you can also specify sharedsecret other than idea according to

Categories : Authentication

MVC4 Forms Authentication but Windows Authentication in Admin Area
Supporting both forms of authentication for one site is a little dicey. I would suggest setting up two separate sites, one for admin and one for the members that both point to the same database. Check out this discussion about the topic: Mixing Forms authentication with Windows authentication

Categories : Asp Net Mvc

Setting a post-authentication View for Windows Authentication
Create a custom AuthorizeAttribute like this: public class MyAuthorizeAttribute : AuthorizeAttribute { private UnitOfWork _unitOfWork = new UnitOfWork(); protected override bool AuthorizeCore(HttpContextBase httpContext) { var isAuthorized = false; var username = httpContext.User.Identity.Name; // Some code to find the user in the database... var user = _unitOfWork.UserRepository.Find(username); if(user != null) { // Check if there are Details for the user in the database if(user.HasDetails) { isAuthorized = true; } } return isAuthorized; } public override void OnAuthorization(AuthorizationContext filterContext) { if (filt

Categories : C#

Should HTTP Basic Authentication be used for client or user API authentication?
By authenticate the client you probably mean the usage of API Key, this mechanism is used to track the concrete application/client. The second thing is that it gives you the possibility to disable the application by disabling the key, for example when client's author removes his account from the service. If you want to make your API public then it is a good idea. But you need to remember that it gives you no real protection, everybody can download the client and extract that key.

Categories : Api

Test transition from Windows Authentication to SQL Server authentication
Your question is too general but here are some steps you should take. Create new sql login and only give necessary permissions to this user Update all connection strings in your application. If these are not consolidated in one config file now is the good time to do this. You can even consider creating a separate class that will handle this. Add login form to your app that will be shown at the application startup so that user can enter credentials Best way to test this is to simply disable your windows user in SQL Server and see if application is still running.

Categories : C#

Hybrid of Windows Authentication and Forms Authentication in ASP.NET MVC 4
You need to use Action Filters for this purpose. You can extend the AuthorizeAttribute like this: public class MyAuthorizeAttribute : AuthorizeAttribute { private UnitOfWork _unitOfWork = new UnitOfWork(); protected override bool AuthorizeCore(HttpContextBase httpContext) { var isAuthorized = false; var username = httpContext.User.Identity.Name; // Some code to find the user in the database... var user = _unitOfWork.UserRepository.Find(username); if(user != null) { isAuthorized = true; } return isAuthorized; } public override void OnAuthorization(AuthorizationContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("fil

Categories : Asp Net Mvc

Can I use SQL Authentication to log into SQL Server 2008 that was set up with Windows authentication?
You need to alter the registry key HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerMSSQL10.MSSQLSERVERMSSQLServer where MSSQL10.MSSQLSERVER is the name of your current instance. It should say "1" now, for Windows. Change it to "2", for Mixed. I believe the initial SA password at this point will be blank. However, it is possible that the SA password was set to something already, so you may not be able to login using SA even after altering the registry. You can read more at: http://www.mssqltips.com/sqlservertip/1441/correct-the-sql-server-authentication-mode-in-the-windows-registry/ Good luck.

Categories : Windows

Persistent ServiceStack Authentication from MVC 4 Forms Authentication
I've used a 'helper method' to return a JsonServiceClient that is authenticated with a session cookie. You'll need to figure out a way to store and supply the authenticated cookie value**. I think the easiest way would be to store it in the MVC Session. public JsonServiceClient GetAuthenticatedClient() { //Need to get an authenticated session key/token from somewhere //this can be used when MVC and ServiceStack are running together-> var sessionKey = SessionFeature.GetSessionKey().Replace("urn:iauthsession:", ""); //maybe add the key/token to a Session variable after your first successful authentication??? var sessionKey = Session["someKey"] var client = new JsonServiceClient("http://" + HttpContext.Request.Url.Authority + "/api")

Categories : C#

Toggle IIS 7.5 Authentication "Anonymous Authentication" with Powershell 3.0?
Try the Set-WebConfigurationProperty cmdlet: Set-WebConfigurationProperty -Filter system.webServer/security/authentication/anonymousAuthentication ` -PSPath MACHINE/WEBROOT/APPHOST ` -Location 'Default Web Site' ` -Name Enabled ` -Value $true

Categories : Authentication

change from windows authentication to sql server authentication
The following connectionString format should do the job. connectionString="user id=yourUsername; password=yourPassword;data source=yourServerName;initial catalog=yourDatabaseName;"

Categories : Sql Server

C# MVC Authentication with the WCF Authentication Service.. a few questions
The proposed solution sounds ok. It was the idea to pass the username/password with every request that sounded bad. The only modification to this would be to not to get the token via the login page but rather from one of unguarded WCF methods. The client flow would be then: call the unguarded method, pass username and password as parameters, get the token call other methods using the token to authenticate If your clients support http cookies you could even rely solely on forms authentication - append forms cookie to the login request and pass the cookie together with other requests. This way you even don't need an extra module.

Categories : C#

How to get property name in firebase
I'm not exactly sure what you're trying to do, but you can remove a property in an object by simply setting it to null. For example: function MyController($scope, angularFire) { angularFire(ref, $scope, "users", {}).then(function() { // You can delete random1 by doing: $scope.users["random1"] = null; // Or: delete $scope.users["random1"]; // You can enumerate all the keys by: for (var key in $scope.users) { console.log(key); } }); } Hope this helps!

Categories : Angularjs

Looking to use Firebase with Actionscript 3 / Air
Doesn't look like there is an AS3 api available but the good news is that they have a rest api which is cross platform that you can write an AS3 wrapper around. (https://www.firebase.com/docs/rest-api.html) That is what I plan to do. I Want to use it with GameBuilder Studio.

Categories : Actionscript

Firebase PHP API getting backlogged and then appear in app all at once
Just launched our application into production and for sure the bottleneck lies with PHP doing something it wasn't meant to do. I solved this by reorganizing code and keeping everything in angularjs to firebase as much as possible. In my case I was making waaaay to many curl requests repeatedly. So offset that to client side instead of server side and it worked MUCH better. (for obvious reasons)

Categories : PHP

Can I use events with the REST api of Firebase?
There is a third-party, limited port of the JS API to Python: https://github.com/abeisgreat/python-firebasin So you can get some limited event functionality, excluding queries and other advanced features, via this approach.

Categories : Python

AngularJS, Firebase, & IE10
I assume and hope you've solved this already, but anyway: you have one slash ('/') missing from the URL pointing to firebase.js which makes IE to trip over. Interestingly, other browsers seem to be able to load the script. You are also missing the starting <head> element.

Categories : Angularjs

Firebase listener not working
This looks like an issue with Android 2.3's SSL implementation. We're working on an update to the library that works around it. Can you try running your app on an emulator with a version >= 3.0? We just released a new version of the library (v1.0.2). Can you give it a try and see if it fixes the problem? It includes workarounds for some of the Android SSL limitations. https://www.firebase.com/docs/downloads.html

Categories : Android

Returning an Array using Firebase
The problem occurs in getPosts(). It pushes a promise into your array inside an async function--that won't work since q.all is called before the promise objects have been added. Also, child_added is a real-time event notification. You can't use that as a way to grab "all of the data" because there is no such thing as "all"; the data is constantly changing in real-time environments. FirebaseIndex is also using child_added callbacks internally, so that's not going to work with this use case either. You can grab all of the posts using the 'value' callback (but not a specific subset of records) as follows: function getPosts() { var def = q.defer(); Firebase.child('users').once('value', function(snap) { var records = []; snap.forEach(function(ss) { records.push( ss

Categories : Node Js

AngularFire does not update Firebase sometimes
I have a solution that works. Seems it is a binding problem on my side. The assignment of tabs[i].col = $scope.links.i looks like the culprit (in this case i = 'open' :-?. It might be my usage of angular. The solution is instead of using tabs[i].col, use $scope.links, that is, use a $scope variable instead of a reference to a $scope variable. controller scope ------ // get the firebase data and store it in var promise = angularFire(url, $scope, 'links', {}) // build the tabs structure, where tabs[i].col = $scope.links.i // build actions for each tab // create an empty tabs[i].obj to use in the form model ng-repeat scope ------- // iterate over the tab structure <tab ng-repeat="tab in tabs" heading="{{tab.title}}" active="tab.active" disabled="tab.dis

Categories : Angularjs

How to keep Firebase in sync with another database
For search queries, you can integrate directly with ElasticSearch; there is no need to sync with a secondary database. Firebase has a blog post about integrating and a lib, Flashlight, to make this quick and painless.

Categories : Database

How to address Firebase from an Arduino?
If you figure out a way, let us (support@firebase.com) know. That would be an awesome hack! Some thoughts: You might want to look into the Spark Core (available for pre-order). They mention SSL support, though it's unclear to me what that means exactly. You could proxy the requests through a server that can speak SSL. For instance, you could run a tiny node.js service on an Amazon EC2 box that just proxies REST requests to Firebase (e.g. using http-proxy). If you're hardcore, you could try to get the Arduino talking to an external ethernet controller that has built-in SSL support (e.g. this one), but that's probably a big project. :-) Longer-term, we might expose a non-SSL endpoint for Firebase requests that's specifically for this sort of low-end hardware use-case. Ping us at sup

Categories : Ssl

Firebase for Android SDK support?
Firebase dev here. If you grab the latest SDK build (v1.0.2, https://www.firebase.com/docs/downloads.html), it should work all the way back to Android 2.2, which I believe is API Level 8. If after updating it still doesn't work, please enable logging Firebase.getDefaultConfig().setLogLevel(Logger.Level.DEBUG); and either post the output or email it to support@firebase.com

Categories : Android

Cannot get Android app to connect to Firebase
Can you try with the latest SDK (v1.0.2) and see if it fixes the problem? We just added a workaround for some of Android's SSL limitations. https://www.firebase.com/docs/downloads.html

Categories : Android

Does firebase work with Firefox OS?
Firebase should definitely work. You will primarily be interacting with it via the REST API You will need to ensure that the correct permissions are present in manifest.webapp. Especially the systemXHR permission I have written a tutorial on writing a Firefox OS App that is powered by another mBaaS : Kinvey. Conceptually things are similar and you could take a look : http://rominirani.com/2013/08/19/firefox-os-tutorial-episode-10-using-mbaas/

Categories : Firefox

Running FireBase in the background
The method with which you are trying to run in the background is reserved for background task completion - really it is not meant for operational execution of code. You should move to a push notification model, or wait for iOS 7 coalesced updates. beginBackgroundTaskWithExpirationHandler: signals iOS that your app would like the task to complete even if the app is moved into the background state, before the app becomes suspended. endBackgroundTask: signals iOS that your app's task has completed, allowing it to move your app to the suspended state if it needs to. If the app remains in the foreground the whole time then these calls have no effect, so it doesn't hurt to use them. Note that background tasks don't get free reign and don't get an indefinite period of time to complete. The "e

Categories : IOS

Firebase + Angularjs + Python
I got it! from firebase import Firebase f = Firebase("https://xxxxx.firebaseio.com/syncedValue") r = f.update({"syncedValue": "3433"})**strong text** that code updates a child of syncedValue so.... I just simply made a child in the controller: ...... angular.module('myApp.controllers', []) .controller('MyCtrl1', ['$scope', 'FBURL', 'angularFire', function($scope, FBURL, angularFire) { angularFire(FBURL+'/syncedValue/1', $scope, 'syncedValue', ''); }]) ......

Categories : Javascript

How to use Basic Authentication to access Asp.Net MVC 4 Intranet Web API method which uses Windows Authentication from a Windows Service?
I had a similar scenario and I decided to create a new user type in our application called Service User. We created a service account in the domain and when we installed the windows service on the server (which was in the same network) we forced the windows service to run as the service account (with network domainusername and password). We have actually created 3 service accounts in our application, one for each environment: ServiceAccountDev, ServiceAccountUAT and ServiceAccountPROD and disabled/enabled each account as appropriate.

Categories : C#

Firebase Simple Login for LinkedIn
There is no Simple Login provider for LinkedIn. The current Firbase Simple Login providers are: Facebook Twitter GitHub Persona Email/Password Firebase is integrated with Singly, who has LinkedIn and dozens of other providers. You might want to look into their services. However, they seem to be pivoting to a health care service instead of an OAuth integration platform, so you may wish to consider their future before committing. Also see Andrew Lee's comment on this answer; Custom Login is a great way to go if you're looking specifically for LinkedIn.

Categories : Authentication

AngularFire removes Firebase locations
AngularFire retrieves data from Firebase asynchronously and returns a promise, not the actual data itself. Therefore, you have a bug in your code where you're assigning the promise to the scope variable but using it before the promise has been resolved. I would fetch both stories first before allowing the user to switch between them. For example: function WrapperCtrl($scope, angularFire) { $scope.showStories = false; var urlStories = 'https://allstory.firebaseio.com/stories'; angularFire(urlStories, $scope, 'storyList', {}).then(function() { $scope.showStories = true; }); $scope.switchStory = function(location) { // var name = manipulate location to extract story number or name, like "story1". $scope.parts = $scope.storyList[name]["parts"]; } }

Categories : Javascript

How to set a custom ID when pushing a new object into Firebase
Instead of using push(), use set() with the Facebook ID: travelBidsFirebaseRef.child("user").child(facebookId).set(user, callback); If you are using simple login and multiple auth providers (e.g. Facebook and Twitter at the same time) then be sure you split out your users by provider, as IDs can possibly clash travelBidsFirebaseRef.child("user/facebook/"+facebookId).set(user, callback); Update As of FirebaseSimpleLogin 1.0, you can now use uid, which is unique across providers: new FirebaseSimpleLogin(ref, function(err, user) { if( err ) throw err; travelBidsFirebaseRef.child('user/'+user.uid).set(user, callback); });

Categories : Angularjs

Using Firebase to group chats by conversation
For chat organized into separate rooms or chat conversations, consider revising your structure to be the following: /chat_messages/<room-id>/<message-id>/<message-data> Using this structure, you can create a new room / conversation id by using a specific name of your choosing, or a Firebase-generated one using .push(). Whenever you want to write a new message to this room, do the following: var chatMessagesRef = new Firebase('<YOUR-FIREBASE>.firebaseio.com/chat_messages'); function sendMessage(roomId, message) { chatMessagesRef.child(roomId).push(message); } Firebase essentially has two ways to query for data: by path and by priority (see Firebase Blog: Denormalizing Your Data is Normal for more information. Firebase push ids are automatically generated to s

Categories : IOS

firebase logout method has no callback?
On that same page, there is a section titled "Monitoring User Authentication State" that mentions that the callback you pass to the FirebaseSimpleLogin constructor function will be "invoked any time that the user's authentication state changed." The first parameter (error) will be non-null if there was an error with the user logging in; the second parameter (user) will be non-null if the user is successfully logged in; and both will be null if the user is not logged in. Here's the example from that page: var chatRef = new Firebase('https://SampleChat.firebaseIO-demo.com'); var auth = new FirebaseSimpleLogin(chatRef, function(error, user) { if (error) { // an error occurred while attempting login console.log(error); } else if (user) { // user authenticated with Firebase

Categories : Angularjs

firebase facebook and twitter Re-authenticating:
I strictly followed the example that can be found here: https://www.firebase.com/docs/security/simple-login-overview.html Any way i modified it a little bit for doing some check. Here is the code I'm using firebaseRef = new Firebase('https://cicero.firebaseio.com'); authClient = new FirebaseAuthClient(firebaseRef, function(error, user) { if (error) { /*login error*/ switch(error.code) { case 'INVALID_EMAIL': case 'INVALID_PASSWORD': EventDispatcher.trigger("login_error","invaild user or email"); break; case 'INVALID_USER': EventDispatcher.trigger("login_error","user does not exist.");

Categories : Facebook



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.