- When the client application needs to acquire an Access Token, it will do so after a simple form-login driven auth process:
A quick note here is that the form login configuration isn’t necessary for the Password flow – only for the Implicit flow – so you may be able to skip it depending on what OAuth2 flow you’re using.
- Next, we will configure our TokenStore to access the same database that authorization server uses to store access tokens:
Note that, for this simple implementation, we’re sharing the SQL backed token store even though the Authorization and Resource servers are separate applications.
- Let’s start with the two simple pages – “index” and “login”; once a user provides their credentials, the front-end JS client uses them to acquire an Access Token from Authorization Server.
- Here is our simple index page:
As we will need to authorize our requests to the resource using our access token, we will append a simple authorization header with access token:
If no cookie is found, the user will be redirected to login page.
- Our client application is a separate module that tries to access resources server after obtaining an access token from authorization server using implicit grant flow.
Learn how to set up OAuth2 for a Spring REST API and how to consume that from an AngularJS client.
Continue reading “Spring REST API + OAuth2 + AngularJS”
- Streams in Node.js
In Node.js, streams are the objects which help the developer read data from the file or write date to file present at a particular location on machine in a regular fashion.
- Reading from a Stream
In this case, we are going to read data from the file ‘inputFile.txt’ which is present at a particular location on the machine.
- Now, create a Node.js project in eclipse with the name as ‘StreamsNodeJSApplication’ and add a js file with the name as When we execute the code present in the ‘file-stream-reader.
- To write to a stream into a file ‘’,we are going to use the same Node.js project ‘StreamsNodeJSApplication’ and add a js file with the name as ‘file-stream-writer.
When we execute the code present in the ‘piping.js’ file by using the node command, we can observe the following output.
In this blog, we will discuss about the reader & the writer streams of Node.js along with their frequently emitted events which are emitted by these streams
Continue reading “Learn the Concept of Streams in Node.js”
We’ve been renewing our front end stack lately. Joel, a software engineer at Smartly.io tells how we migrated from Angular to React without a massive rewrite.
Continue reading “How to Migrate from Angular to React Without a Massive Rewrite”
- I have a svg map that I have zoomed way into and is contained in a div of a smaller size.
- I have a drop box with all the names of the locations and on click I want the svg map inside the div to move to the specific x and y coordinates.
- I tried to mess around with the viewbox and transform properties but all they do is cut the svg out.
I have a svg map that I have zoomed way into and is contained in a div of a smaller size. I have a drop box with all the names of the locations and on click I want the svg map inside the div to move to the specific x and y coordinates.
I’ve been trying to do this for so long and I don’t seem to be able to do so. I tried to mess around with the viewbox and transform properties but all they do is cut the svg out.
Continue reading “angularjs”
- In contrast, the project’s root directory is the place for configuration files for the build and overall project.
- Create the directory within your project and copy the entire directory, , and files from Angular Tour of Heroes into the newly created directory.
- In most cases, an Angular application consists of TypeScript files using ES2015 modules with HTML templates and styles defined either in line with components or in external files.
- Place the file in the directory with the rest of the Angular application and add this code:
In addition to the polyfills, this file also imports the script to bootstrap the Angular application.
- Finally, the file looks like this:
The working directory structure now looks like this:
This tutorial has taken you through the basics of building the Angular portion of the application.
This tutorial shows how to create an Angular build with webpack from scratch. Learn to compile TypeScript, bundle resources, run a development server and more!
Continue reading “Angular Build with Webpack from Scratch”
- The Company posted all-time record quarterly revenue of $78.4 billion and all-time record quarterly earnings per diluted share of $3.36.
- These results compare to revenue of $75.9 billion and earnings per diluted share of $3.28 in the year-ago quarter.
- International sales accounted for 64 percent of the quarter’s revenue.
Broken Pen is a content curated aggregator that regularly proposes relevant information and data about the most important tech companies.
Continue reading “Apple 2017 Q1 Summary Data”
See latest Elite InfoWorld news and how it competes against competitor Cygnet and other companies in its sector: Elite InfoWorld Blog Why AngularJS For Your Next Project?
Continue reading “Elite InfoWorld News: Elite InfoWorld Blog Why AngularJS For Your Next Project?”