Fight for the Future is committed to protecting your privacy. If you sign onto one of our various mailing lists, petitions, or use our contact tools, we retain the information you provided to primarily manage our mailing lists, and secondarily to transmit only the information that is required to service providers and public officials when required to submit your communications with them.
We do not sell our email list. We do not share or distribute your contact information unless specifically stated so.
If you sign up to volunteer or RSVP to a local event—for example by submitting your phone number in a volunteer signup field—we may share your contact information with partner organizations, third party services, or other volunteers, for the purposes of volunteer coordination only.
For petitions, open letters, or similar public communications that you’ve signed or completed, we treat your name, city, state, and comments as public information. We will not make your street address publicly available, but we may transmit it to public officials as part of a petition or open letter, and they may make it public.
If you enter your information as part of a clearly-labeled “joint action” with another organization, we may share your name, email and other information you have entered with the partner organization(s) for that particular action. If you are submitting your information to one of these campaigns or websites, you are opting into the sharing of your information for the stated purposes and will be treated as so.
We sometimes carry out our business or operate our website using third party tools or services. Information may be shared with the operators of those tools or services in connection with our use of those tools or services to carry out business or operate our website.
Last changed: 7/10/2017
Demand Progress/Demand Progress Action takes your privacy very seriously. We do not share your email address or other personal information with unauthorized entities without your permission.
We use the information we collect to inform you of news, activism opportunities, and other matters that relate to Demand Progress/Demand Progress Action, and to deliver petition signatures, emails/letters, and similar communications to designated targets.
For petitions, emails/letters, or similar public communications that you’ve signed or completed, we treat your name, city, state, and comments as public information. We will not make your street or email address publicly available, but we may transmit such information to public officials/petition targets as part of a petition, open letter, or similar correspondence. (For instance, this information must be included to enable delivery of emails to members of Congress or comments to administrative agencies.)
DP (501(c)3 arm) and DPA (our 501(c)4 arm) have a resource sharing agreement that enables each to contact activists whose contact information was gathered by the other. Our 501(c4) arm and our 527 entity (also called Demand Progress) also have such a resource sharing agreement.
DP/DPA owns and administers the Watchdog.net site. And as of the summer of 2013, DP/DPA owns and administers Rootstrikers.org. DP/DPA may contact subscribers to the Watchdog.net and Rootstrikers.org sublists. You may unsubscribe from email alerts from any or all of DP/DPA, Rootstrikers.org, or Watchdog.net at any time.
If you enter your information as part of an action that is organized in partnership with one or more other organizations, and labeled as such, then we may share your name, email, and other information you have entered with the partner organization(s) for that particular action. We house data in accounts we hold with vendors such as ActionKit and Action Network. We sometimes enlist third-party vendors to help us manage data. We may use cookies from third parties such as Google Adwords to serve ads based on usage of this site.
If you sign up to volunteer — for example by submitting your phone number in a volunteer signup field — we may share your contact information with partner organizations, third party services, or other volunteers, for the purposes of volunteer coordination.
DP is a fiscally sponsored project of the New Venture Fund, and DPA is a fiscally sponsored project of the New Venture Fund.
If you have any questions about our privacy policy, don’t hesitate to contact us.
Free Press and the Free Press Action Fund are committed to protecting the privacy of visitors to our website, as well as that of our members and activists. In fact, we support enhanced protections for everyone’s electronic and Internet privacy.
In this policy, “Free Press” refers to both Free Press and Free Press Action Fund staff, board members, cooperating attorneys, interns, volunteers and consultants.
In general, Free Press and our software partners treat your contact information as private and confidential. Free Press will not give, sell, rent, exchange or otherwise share your information with anyone else without your prior consent except as compelled by law (see below).
We will notify users of updates to this policy by noting the date of new changes directly below this statement.
This policy was last amended on July 10, 2017.
Policy effective May 1, 2003.
Website Policies
Free Press and third-party vendor servers may record the IP address of your computer; the browser software you use and your operating system; the date and time you access our site; and the Internet address of the website from which you linked to our site.
We use this information to measure the number of visitors to different sections of the site, to diagnose and correct system errors and to improve the site. We do not connect this information to your name or identity, and we do not retain this information permanently.
Information that is not provided with the express intent of subscription, ordering, membership or donation will not be captured for use in other communications unless otherwise noted. We (and our vendors) restrict the use of “cookies” on this site primarily to convenience features such as auto login, surveys and polls. We typically delete these cookies as soon as is reasonably possible.
External Links
Free Press has not reviewed all of the sites linked to this site and is not responsible for the privacy practices or the content of any off-site pages or any other sites linked to this site, whether or not they are affiliated with Free Press or the Free Press Action Fund. Such linked sites are for your convenience only and you access them at your own risk. Free Press makes no representations or warranties as to the accuracy or functioning of any such link. That another website is linked to our site does not constitute endorsement from Free Press or the Free Press Action Fund of the owner of the other site, the content of its site or its products or services.
Electronic Mailing List Policies
Free Press offers several electronic mailing lists. If you choose to subscribe to any of these lists, we may ask for personal information such as your name, ZIP code and email address. We use this information solely to manage our lists (for example, we may use your ZIP code for a targeted mailing on an issue affecting your area). We do not sell or rent our electronic mailing lists.
If you sign up to volunteer—for example by submitting your phone number in a volunteer signup field on a website form —we may share your contact information with partner organizations, third party services, or other volunteers, for the purposes of volunteer coordination.
There are a number of ways to subscribe to Free Press’ electronic mailing lists, including submitting a form on our website, opting in when you engage in online or offline activism, or mailing or completing a sign-up form from a paper petition, brochure or flier. When you subscribe, you will typically receive a confirmation message welcoming you.
You may unsubscribe from any of our lists at any time. If you wish to update your information, delete or otherwise make changes to your relationship with us, or remove yourself entirely from our list(s), click here.
Lists Free Press maintains for electronic mailings are exclusively “opt-in” lists. We do not purchase information from third-party sources or gather personal data from the Web (known as spidering) for inclusion in our email lists.
Online Activism
Our website offers many ways to engage in online activism. Many of these tools are hosted and administered by a third party (currently ActionKit). When you provide personal information by signing a petition or engaging in other actions, that personal information may be stored on our server(s) and/or ActionKit’s server(s). If you choose to join a mailing list or become a member at the same time that you participate in an online action, your relevant information will be kept and used for those other purposes.
We may deliver petitions and surveys you’ve completed to the president, federal and state legislators, agencies like the Federal Communications Commission, other elected and appointed officials, or other entities such as companies whose policies we seek to change. We ask for your address so we can deliver your message to the appropriate legislative offices, and may include information such as your name, town or city and state in these deliveries.
ActionKit strictly adheres to policies preventing unauthorized access to your personal information and will not make such information available to anyone outside of Free Press or ActionKit (unless legally compelled to do so).
Financial Support
Free Press and the Free Press Action Fund are committed to maintaining the trust and security of all financial supporters. We collect personal information including the email and mailing addresses that members and donors provide. We might use this information for online and print mailings to keep you informed about our programs and occasionally to ask for additional financial support. You may opt out of these communications at any time.
To opt out of email communication, click here.
To opt out of print mailings, please call us at<PHONE_NUMBER> or email us.
On occasion, Free Press or the Free Press Action Fund sends messages on behalf of other reputable organizations when we believe such messages may be of value to our members and supporters. Our ability to send you these messages on behalf of other entities helps us build our membership base and further the movement for your rights to connect and communicate. If you do not wish to receive such messages from our allied or aligned organizations, please call us at<PHONE_NUMBER> or email us. Free Press is not responsible for the privacy practices or the content produced or provided by any of these other entities.
All financial data is collected via a secure Web connection, and is stored or transmitted using appropriate security measures at all times.
Online and Phone Orders for Materials
Information provided to us in the course of placing an order for educational materials, activist toolkits, promotional materials or other materials offered by Free Press (whether or not the materials are offered at a cost) may be retained for use in future communications, such as membership drives, or when we unveil similar offerings we believe may be of interest to you. This information will not be given, sold, rented, shared or otherwise provided to anyone else without your prior consent (except when compelled by law — see below).
All financial data is collected via a secure Web connection, and is stored or transmitted using appropriate security measures at all times.
Compelled Disclosure
If we are required by law to disclose any information that you have provided us, we will attempt to give you notice (unless we are prohibited from doing so) that a request for your information has been made, in order to give you an opportunity to object. We will attempt to provide this notice by email, if you have given us an email address, or by postal mail if you have entered a postal address. If you do not challenge the disclosure request, we may be legally required to turn over your information. In addition, we may independently object to any disclosures we believe to be improper.
Questions?
If you would like additional information about our privacy practices and/or our policies, please contact info(AT)freepress.net.
Copyright Policies
All original text, images and other materials hosted on freepress.net servers are copyright 2009–2014 Free Press, unless otherwise noted (e.g., news articles and licensed photos).
We encourage reproduction and distribution of original materials on this site for educational and personal use. All Free Press-created content on this site (unless otherwise noted) is available to you under a Creative Commons Attribution-NonCommercial-ShareAlike license.
In short, this license allows you to copy, distribute, display or make derivative works provided that you a) credit Free Press, b) do not use it for commercial purposes and c) release any derivative works under this same license.
Copyright-Infringement Notification
If you have a copyright complaint, please follow the procedures set forth in the Digital Millennium Copyright Act. Our agent for notice is Kimberly Longey, chief operating officer. She may be reached by phone at<PHONE_NUMBER>, by fax at<PHONE_NUMBER> or by email at<EMAIL_ADDRESS>Please direct your written correspondence to her at:
Free Press
40 Main St., Suite 301
Florence, MA 01062


{% extends "tbutton/installed.html" %} {% block page_title %}Toolbar Buttons {{ tbutton.version }} Updated{% endblock %} {% block header %}
You have just updated to Toolbar Buttons {{ tbutton.version }}. To see what has changed, just scroll down to read the realse notes. To configure what buttons you are using open the customize toolbar window by either right clicking on the toolbar and selecting customize from the pop up menu or going View then Toolbars then Customize and from the window that opens up you can drag the buttons to your toolbar.
To find out more information about each of the buttons, please see our Button List which has descriptions of all the buttons.
{% endblock %}


In this task we implement a matrix-matrix multiplication kernel (GEMM). We will study the Intel SPMD program compiler (ISPC) to generate vectorized code for us (you will appreciate this if you found the previous manual vectorization of the reduction kernel already tedious).
Start with the serial implementation of the GEMM kernel in gemm.cpp
. This will be your baseline you test your ISPC implementation against (gemm_serial
). You can compile and test your serial implementation with
you may omit debug=true
if you do not need the debug symbols in your code. Your implementation should return a norm of truth of 255.966
for double precision data and 256.211
for single precision data.
To start working with ISPC, you need to install it first. The exercise provides a 64bit Linux binary which will work on euler or in your 64bit Linux distribution. To install ispc
run the command
See the Makefile
for more information. After ispc
has been installed, you need to either logout and login again to euler or source your ~/.bashrc
file again. To do this, run
Have a look at the output of ispc --help
.
Check the lecture slides and the getting started section on the ISPC documentation page to figure out the function signature of an exported ISPC function. You also need to understand the varying
and uniform
rate qualifiers when working with ISPC. Complete the function signature of the ISPC kernel in gemm.ispc
. Next, complete the Makefile
to establish the foundation to compile your ISPC code. Have a look at ispc --help
, especially the --arch
and --target
options. We want to target SSE2
and AVX2
extended instruction sets. After completion, you should be ready to successfully execute the main target (since it is the default, you may omit gemm
)
Now you are at the point to start working on the ISPC implementation of the GEMM kernel. Write your ISPC function body in the file gemm.ispc
. Use your serial implementation as a guide. This is the core part of this exercise.
Compile your application code and link to the ISPC generated code with
you may want to use debug=true
while developing your code. To check the benchmark results, you can use the job
target in the Makefile
. It will compile your code first if there were changes before the job is submitted. For convenience, you may want to work on an interactive node on euler such that you do not need to submit jobs all the time (and wait for them to complete). You can check out a single core on a node on euler for interactive work (for 1 hour) using
If all went well, your vectorized implementations should be faster than your serial baseline.


We extend users!
- generate end-to-end content
- harness intuitive e-business
- strategize killer markets
- matrix visionary e-tailers
- scale synergistic applications
- e-enable revolutionary interfaces
- engage efficient paradigms
- cultivate dot-com architectures
- deliver frictionless deliverables
- generate cutting-edge e-services
- visualize next-generation mindshare


A new way of thinking about the brain essentially. Neuroplasticity takes a non deterministic view of human potential. Where the previous concensus was built on the idea of intelligence being fixed once the brain had fully developed, the newer concensus is that the brain can form new synaptic pathways and strengthen them based on intillectual and environmental inputs. Since the 70's and 80's Neuroplasticity has gained wide acceptance through the scientific community as a complicated but fundimental reality of the human brain.
"Neuroplasticity research showed
that the brain changes its very structure with each different activity it performs, perfecting
its circuits so it is better suited to the task at hand."
-Naveen Jain
Channelling these ideas into your life can be daunting if you view it as a whole, but I would advise anyone interested, to bite themself off small achievable chunks. You can become more neuroplastic by working out regularly, eating well, sleeping at least 8 hours a night, reading a book, travelling to another country, learning a new language etc.
"change is mostly limited to those situations which the brain is in the mood for it"
-10 fundamentals of rewiring your brain.
Debbie Hampton
No one can do everything at once, and everyone has different commitments and responsibilities. No
progress will be made if youre just adding stressors to achieve more in the same amount of day.
I feel like a good approach to start is by identifying some short term goals, that allign with your
interests and frame them with a...
The easiest way to think about the growth mindset is to consider what it isnt.
states:
"in a fixed mindset, students believe their basic ablities, their intelligence, their talents, are
just fixed traits. They have a certain amount and that's that, and then their goal becomes to look smart
all the time and never to look dumb."
-Psychologist Carol Dweck
A growth mindset challenges this notion by placing emphasis and reward on effort and persistance, not the
educational outcomes themselves. 'I dont know now but I will know soon' encapsulates the relevance for coding;
a bottomless and everchanging branch of the tech world, where its much more important to lean the tools of learning
to help you stay relevant, than it is to be infinately knowledgable using the current tools.
It suprised me to discover how intrinsic and obvious this feels to me, knowing we arnt born with the skills
to drive cars, speak languages, or play guitar but these are skills both developed in the musculature and the mind with
practice and habit.
Despite this however the other suprise was just how defeatist my thoughts have been throughout
foundations. When it comes to anything remotely resembling mathmatics felt so intimidating, so reminiscent of past faliures,
that I need keep aware of the feeling of mental fog, staring at the screen inertia, and maintain habits around getting fresh
air, and just caring to my basic needs emotionally. Its just like driving a car, you just need to put the hours in.


Snack Bar
<mat-snack-bar>
Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons.
Snackbars contain a single line of text directly related to the operation performed. They may contain a text action, but no icons.


§ Equivalent Definitions of One-forms
Definition I. Let \(M\) be a manifold and consider the cotangent bundle \((T^*M, \pi,M)\).
A one-form on \(M\) is a section \(\omega\in\Gamma(T^*M):=\Omega^1(M)\).
Definition II. Let \(M\) be a manifold and consider the cotangent bundle \((T^*M, \pi,M)\).
A one-form on \(M\) is a map \(\omega\colon \Gamma(TM)\to \mathcal{C}^\infty(M)\).
Proposition. Both definitions of one-forms are equivalent.
Proof. Suppose that a one-form is a section \(\omega\in \Gamma(T^*M)\). Then, \(\omega\colon M\to T^*M\),
so that \(\omega(p):=(p, \omega_p)\), where \(\omega_{p}\in T^*_pM\). We can define a map \(\Omega \colon \Gamma(TM)\to\mathcal{C}^\infty(M)\)
such that for a section \(X\in\Gamma(TM)\), given by \(X(p)=(p,X_p)\) where \(X_p\in T_pM\), we have:
$$\begin{equation}
\Omega(X):= \omega_p(X_p) \quad \forall p\in M
\end{equation}$$
After which we simply rename \(\Omega\equiv\omega\) and we have shown one implication.
It remains to show, that if \(\omega\colon \Gamma(TM)\to \mathcal{C}^\infty(M)\), then we can define a smooth section
\(\Omega\in\Gamma(T^*M)\). We do so as follows: for each \(p\in M\), we define \(\Omega(p)=(p,\Omega_p)\), where
\(\Omega_p\in T^*_pM\) is defined via \(\Omega_p(X_p):=\omega(X)(p)\), where the vector field \(X\) is constructed
such that \(X(p)=(p,X_p)\). \(\blacksquare\)


Sep 18, 2015
Winter May be coming?
I was very curious about whether Content blocking scripts in iOS 9 will go mainstream. Content Blocking (in the form of Adblocking) has been around forever in desktop, but has largely remained in the “nerd” / “geek” territory. Most people didn’t care enough as there was no immediate / tangible benefit for the effort involved in installing an adblocker extension (even though installing one is not all that hard). Only 5% of all Internet users had an ad blocker installed.
However on mobile, there are tangible benefits promoted by ad blockers.
* Reduced bandwidth costs
* increased battery life).
Ad-blocking app Crystal claims 3.9x times faster load and 53% lesser data use on the Top 10 popular news sites, Still it is an opt-in and a two-step installation process. The installation process is similar to that of custom keyboards, and in my experience most mainstream users had not both installing custom keyboards.
Content blocking scripts are off to a strong start.
Three of the Top 5 Paid apps are content blocking scripts. That is really strong considering the payment hurdle and the installation hurdle.
Content blocking is also a trending search (which presumably will drive install to free ones too).
It is possible that the early adopters are installing these content scripts (and about 12% of devices had iOS 9 installed keeping pace with iOS 8.)
I am definitely surprised by this trend. I was somewhat skeptical about the adoption of these types of apps, but it looks like there might be enough momentum for this to go mainstream. (It’d be interesting to know if custom keyboards were trending ever in the app store, especially in the early days of iOS 8 due to the curiosity factor).
The takeaway for PMs is that if you address a real problem (like bandwidth costs or battery life), users may be willing to take an obscene amount of effort to use your solution. Painkillers, Vitamins yada yada yada.
As for the larger ramifications of this, winter may be coming
Jul 17, 2015
iOS App Release Notes are loaded with personality
It is not new that app developers tend to show some personality in their release notes (I am really curious how many “regular, non-nerds” read those anymore). However, I saw a few awesome examples of app developers taking extra care about their craft and showing some love in release notes. All these apps were updated in the past two days, and all this awesomeness got me excited enough to write a post about it, after a long hiatus! That is how excited I got!
My latest favorite Annotate App (which is what I used to create these screenshots and which was a life-saver in recent moving and home-improvement projects)
The Medium app seizes your attention by starting on a somber note. Very creative.
Slack, making an awesome reference to Hitchhiker’s guide (and yeah, how come there is no :towel: emoji)
Overcast, with a short and sweet reference to bugs in iOS 9 and Dark Sky having a talk with charts that wobble.
Yelp (which continues to be awesome, I had called them out for awesome release notes way back in May 2011)
And the amazing Trello, which seriously levels up, has a @steveplustrello twitter account and
It is also nice to see people asking for reviews nicely in release notes, as opposed to interrupting the user’s flow inside the app. In a world of auto-updates, If a user is interested enough to read your release notes, they are quite likely your more engaged users, who are arguably more likely to take the time to leave a review for you. (or atleast tweet about it).
Nice job, app developers.
Jan 1, 2015
Theme for 2015 -> Creation
Reading the 37Signals blog post about picking a theme for the new year rather than a resolution really resonated with me too.
My theme for 2015 is going to be : Creation
If you think about “Stuff” (content / knowledge work / whatever), there is a hierachy of Creation, Curation and Consumption. I’d give myself a 9/10 in Consumption, probably a 6/10 in curation and a measly 3 out of 10 in Creation.
This year, I want to change that. I want to get more deliberate about curating and do more creating.
Nov 9, 2014
If you haven't talked to a customer today, you are doing it wrong
Great advice for entrepreneurs and Product Managers from Startup L Jackson.  Keep refining the framework everytime you meet someone new!
And there are a few specific examples of how you can keep refining it based on who you meet.
Anyone and Everyone:
Ask everyone you meet what they believe, and why. When you’re talking to your Cousin Eddie, ask him about his favorite apps. How does he buy stuff? Does he watch YouTube? How does he find new restaurants or plan his travel? How does he advertise his small business?
Founders:
When you meet other founders, ask them how their business works. Treat them as experts with insights that can help you improve your framework. Who are their customers? What do their customers love about the product? What have they tried that customers hated? How do they explain the product to customers? They’re building a marketplace, cool! How much do providers have to make to stay engaged? How many uses before a buyer sticks?
Customers:
And if you have an area you’re working, talk to customers. Every day. Talk to users of your product, active, inactive, new, and old. Talk to people who don’t want to use your product. Talk to people who are using a competitor’s product. Talk to customers of products in adjacent markets. Now, reread this paragraph and replace talk with listen.
The full article
Nov 5, 2014
Conflict Strategies for Product Managers
I saw this article on HBR (it is from last year). It is meant for “nice people”, but I think these are just as applicable to Product Managers, who often need to wield influence without authority.
Teams need conflict to function effectively. Conflict allows the team to come to terms with difficult situations, to synthesize diverse perspectives, and to make sure solutions are well thought-out. Conflict is uncomfortable, but it is the source of true innovation and also a critical process in identifying and mitigating risks.
As a PM, you need to be comfortable with a healthy level of conflict. Healthy Conflict is a sign of passionate people who stand for something. If you are not getting push back on your ideas, you may be settling for mediocre local maxima.
The secret of having healthy conflict and maintaining your self-image as a nice person is all in the mindset and the delivery. To start shifting your mindset, think about your value to the team not in how often you agree, but in how often you add unique value.
Wow! and now for a couple of specific tips:
- Use “and,” not “but.”
May Sound cheesy, but this is a flavor of the Yes And Principle in Improv.
- Ask for help. Another tactic for “nice conflict” is to be mildly self-deprecating and to own the misunderstanding.
The wrong way to be a hero is by avoiding conflict or “taking one for the team”. Don’t be that kind of a heroic PM.
Full Article


HOME
SEARCH
Spotify Playlist
Spotify Playlist
Songs Loaded - /
Songs Loaded - /
Songs Downloaded - Not Downloading
Songs Downloaded - Not Downloading
Login with Spotify for full playlist
Login with Spotify for full playlist
Playlist - "" Owner - ""
Song
Artist
Beatsaver
Download
Download All
Download BeatDrop


Class MailParser
- Defined in:
- mailparser.js
Constructor
Creates instance of MailParser which in turn extends Stream
Options object has the following properties:
- debug - if set to true print all incoming lines to console
- streamAttachments - if set to true, stream attachments instead of including them
- unescapeSMTP - if set to true replace double dots in the beginning of the file
- defaultCharset - the default charset for text/plain, text/html content, if not set reverts to Latin-1
Fields
| Field | |
|---|---|
|
[private]
Current node of the multipart mime tree that is being processed
|
|
|
[private]
An object of already used attachment filenames
|
|
|
[private]
Cache for iconv converter objects
|
|
|
[private]
Line counter for debugging
|
|
|
[private]
Did the last chunk end with \r
|
|
|
[private]
An array of multipart nodes
|
|
|
[private]
The remaining data from the previos chunk which is waiting to be processed
|
|
|
[private]
Indicates current state the parser is in
|
|
|
This is the final mail structure object that is returned to the client
|
|
|
The complete tree structure of the e-mail
|
|
|
Options object
|
Methods
| Method | |
|---|---|
|
_convertString(value, fromCharset, toCharset)
[private]
Converts a string from one charset to another |
|
|
_createMimeNode(parentNode)
[private]
Creates an empty node element for the mime tree Created element includes parentNode property and a childNodes array. |
|
|
_detectHTMLCharset(HTML)
[private]
Detects the charset of an HTML file |
|
|
_encodeString(value)
[private]
Encodes a header string to UTF-8 |
|
|
[private]
Finalizes a node processing If the node is a text/plain or text/html, convert it to UTF-8 encoded string If it is an attachment, convert it to a Buffer or if an attachment stream is set up, close the stream |
|
|
_generateFileName(fileName)
[private]
Generates a context unique filename for an attachment If a filename already exists, append a number to it
|
|
|
_handleAttachmentLine(line)
[private]
Processes a line in an attachment node If a stream is set up for the attachment write the line to the stream as a Buffer object, otherwise append it to the content property |
|
|
_handleTextLine(line)
[private]
Processes a line in text/html or text/plain node Append the line to the content property |
|
|
_parseContentDisposition(value)
[private]
Parses Content-Disposition header field value Fetches filename to current node meta object |
|
|
_parseContentType(value)
[private]
Parses a Content-Type header field value Fetches additional properties from the content type (charset etc. |
|
|
_parseHeaderLineWithParams(value)
[private]
Splits a header value into key-value pairs Splits on For example { defaultValue: "text/plain", charset: "utf-8" } |
|
|
_parsePriority(value)
[private]
Parses the priority of the e-mail |
|
|
_process(finalPart)
[private]
Processes the data written to the MailParser stream The data is split into lines and each line is processed individually. |
|
|
_processHeaderLine(pos)
[private]
Processes a complete unfolded header line Processes a line from current node headers array and replaces its value. |
|
|
_processMimeNode(node, level)
[private]
Processes of a node in the mime tree Pushes the node into appropriate |
|
|
[private]
Processes the mime tree Finds text parts and attachments from the tree. |
|
|
_processStateBody(line)
[private]
Processes a line while in body state |
|
|
_processStateHeader(line)
[private]
Processes a line while in header state If header state ends and body starts, detect if the contents is an attachment and create a stream for it if needed |
|
|
_replaceMimeWords(value)
[private]
Replaces mime words in a string with UTF-8 encoded strings |
|
|
_trimQuotes(value)
[private]
Removes enclosing quotes ("", '', <>) from a string |
|
|
_updateHTMLCharset(HTML)
[private]
Replaces character set to UTF-8 in HTML <meta> tags |
|
|
_walkMimeTree(node, level)
[private]
Walks the mime tree and runs processMimeNode on each node of the tree |
|
|
end(chunk, encoding)
Terminates the MailParser stream If "chunk" is set, writes it to the Stream before terminating. |
|
|
write(chunk, encoding)
Writes a value to the MailParser stream
|
Converts a string from one charset to another
| Parameters (optional) | ||
|---|---|---|
| value | {Buffer|String} | A String to be converted |
| fromCharset | {String} | source charset |
| toCharset | {String} |
destination charset
Default: "UTF-8"
|
- Returns:
- {Buffer} Converted string as a Buffer (or SlowBuffer)
Creates an empty node element for the mime tree
Created element includes parentNode property and a childNodes array. This is needed to later walk the whole mime tree
| Parameters (optional) | ||
|---|---|---|
| parentNode | {Object} | the parent object for the created node |
- Returns:
- {Object} node element for the mime tree
Detects the charset of an HTML file
| Parameters (optional) | ||
|---|---|---|
| HTML | {String} | html contents |
- Returns:
- {String} Charset for the HTML
Encodes a header string to UTF-8
| Parameters (optional) | ||
|---|---|---|
| value | {String} | String to be encoded |
- Returns:
- {String} UTF-8 encoded string
Finalizes a node processing
If the node is a text/plain or text/html, convert it to UTF-8 encoded string If it is an attachment, convert it to a Buffer or if an attachment stream is set up, close the stream
Generates a context unique filename for an attachment
If a filename already exists, append a number to it
- file.txt
- file-1.txt
- file-2.txt
| Parameters (optional) | ||
|---|---|---|
| fileName | {String} | source filename |
- Returns:
- {String} generated filename
Processes a line in an attachment node
If a stream is set up for the attachment write the line to the stream as a Buffer object, otherwise append it to the content property
| Parameters (optional) | ||
|---|---|---|
| line | {String} | A line to be processed |
Processes a line in text/html or text/plain node
Append the line to the content property
| Parameters (optional) | ||
|---|---|---|
| line | {String} | A line to be processed |
Parses Content-Disposition header field value
Fetches filename to current node meta object
| Parameters (optional) | ||
|---|---|---|
| value | {String} | A Content-Disposition header field |
Parses a Content-Type header field value
Fetches additional properties from the content type (charset etc.) and fills current node meta object with this data
| Parameters (optional) | ||
|---|---|---|
| value | {String} | Content-Type string |
- Returns:
- {Object} parsed contenttype object
Splits a header value into key-value pairs
Splits on ;
- the first value will be set as defaultValue
property and will
not be handled, others will be split on =
to key-value pairs
For example content-type: text/plain; charset=utf-8
will become:
{ defaultValue: "text/plain", charset: "utf-8" }
| Parameters (optional) | ||
|---|---|---|
| value | {String} | A string to be splitted into key-value pairs |
- Returns:
- {Object} a key-value object, with defaultvalue property
Parses the priority of the e-mail
| Parameters (optional) | ||
|---|---|---|
| value | {String} | The priority value |
- Returns:
- {String} priority string low|normal|high
Processes the data written to the MailParser stream
The data is split into lines and each line is processed individually. Last line in the batch is preserved as a remainder since it is probably not a complete line but just the beginning of it. The remainder is later prepended to the next batch of data.
| Parameters (optional) | ||
|---|---|---|
| finalPart | {Boolean} |
if set to true indicates that this is the last part of the stream
Default: false
|
Processes a complete unfolded header line
Processes a line from current node headers array and replaces its value.
Input string is in the form of "X-Mailer: PHP" and its replacement would be
an object {key: "x-mailer", value: "PHP"}
Additionally node meta object will be filled also, for example with data from To: From: Cc: etc fields.
| Parameters (optional) | ||
|---|---|---|
| pos | {Number} | Which header element (from an header lines array) should be processed |
Processes of a node in the mime tree
Pushes the node into appropriate this.mailData
array (text/html
to this.mailData.html
array etc)
| Parameters (optional) | ||
|---|---|---|
| node | {Object} | A mime tree node |
| level | {Number} |
current depth
Default: 0
|
Processes the mime tree
Finds text parts and attachments from the tree. If there's several text/plain or text/html parts, push the ones from the lower parts of the tree to the alternatives array
Emits "end" when finished
Processes a line while in body state
| Parameters (optional) | ||
|---|---|---|
| line | {String} | The contents of a line to be processed |
- Returns:
- {Boolean} If body ends return true
Processes a line while in header state
If header state ends and body starts, detect if the contents is an attachment and create a stream for it if needed
| Parameters (optional) | ||
|---|---|---|
| line | {String} | The contents of a line to be processed |
- Returns:
- {Boolean} If state changes to body retuns true
Replaces mime words in a string with UTF-8 encoded strings
| Parameters (optional) | ||
|---|---|---|
| value | {String} | String to be converted |
- Returns:
- {String} converted string
Removes enclosing quotes ("", '', <>) from a string
| Parameters (optional) | ||
|---|---|---|
| value | {String} | String to be converted |
- Returns:
- {String} converted string
Replaces character set to UTF-8 in HTML <meta> tags
| Parameters (optional) | ||
|---|---|---|
| HTML | {String} | html contents |
- Returns:
- {String} updated HTML
Walks the mime tree and runs processMimeNode on each node of the tree
| Parameters (optional) | ||
|---|---|---|
| node | {Object} | A mime tree node |
| level | {Number} |
current depth
Default: 0
|
Terminates the MailParser stream
If "chunk" is set, writes it to the Stream before terminating.
| Parameters (optional) | ||
|---|---|---|
| chunk | {Buffer|String} | The data to be written to the MailParser stream |
| encoding | {String} | The encoding to be used when "chunk" is a string |
Writes a value to the MailParser stream
| Parameters (optional) | ||
|---|---|---|
| chunk | {Buffer|String} | The data to be written to the MailParser stream |
| encoding | {String} | The encoding to be used when "chunk" is a string |
- Returns:
- {Boolean} Returns true


Welcome to {{ title }}!
{{ name }}
Happy Labor Day!
Here are some links to help you start:
Tour of Heroes
CLI Documentation
Angular blog


(a) Except as specified in 3.602, a contracting officer shall not knowingly award a contract to a Government employee or to a business concern or other organization owned or substantially owned or controlled by one or more Government employees. This policy is intended to avoid any conflict of interest that might arise between the employees’ interests and their Government duties, and to avoid the appearance of favoritism or preferential treatment by the Government toward its employees.
(b) For purposes of this subpart, special Government employees (as defined in 18 U.S.C. 202) performing services as experts, advisors, or consultants, or as members of advisory committees, are not considered Government employees unless—
(1) The contract arises directly out of the individual’s activity as a special Government employee;
(2) In the individual’s capacity as a special Government employee, the individual is in a position to influence the award of the contract; or
(3) Another conflict of interest is determined to exist.
The agency head, or a designee not below the level of the head of the contracting activity, may authorize an exception to the policy in 3.601 only if there is a most compelling reason to do so, such as when the Government’s needs cannot reasonably be otherwise met.
(a) Before awarding a contract, the contracting officer shall obtain an authorization under 3.602 if—
(1) The contracting officer knows, or has reason to believe, that a prospective contractor is one to which award is otherwise prohibited under 3.601; and
(2) There is a most compelling reason to make an award to that prospective contractor.
(b) The contracting officer shall comply with the requirements and guidance in Subpart 9.5 before awarding a contract to an organization owned or substantially owned or controlled by Government employees.


Hi,
When using the main sketch (emonTx_DiscreteSampling), energy must be calculated on emoncms using the "Power to Kwh" processor input. As explained here, it can cause large errors (RF packet lost, internet connection down, emoncms down , ...).
So, I would like to modify this sketch in order to calculate the total accumulated wh on-board the TX. Correct me if I'm wrong but it must not be very difficult. One just needs to measure the time elapsed since the last sent and then add the corresponding energy (power x time-elapsed).
My first concern is that it seems so simple to me at first sight ... Am I missing something ? Has anybody already wrote such a sketch ?
Another concern :
Will it still be possible to catch interrupts (pulse counting) with the same sketch ? If there is a high number of pulses, it may be difficult to measure the time elapsed since the last sent ?
Thank's for your help.
Eric
Re: Calculating Wh totals in the discrete sampling sketch
Hello Eric, your not missing anything, it would be good to add this to the discrete sampling sketch. The frequency of pulse counting is usually quite slow and the time request to process an interrupt relatively short, I dont think it would affect the time elapsed significantly but I haven't tested it.
Re: Calculating Wh totals in the discrete sampling sketch
Hi,
Ok , it will try to implement that. There is a real need.
The frequency of pulse counting can easily reach 10 Hz on buildings I'm monitoring (36 kW + 1 pulse/1Wh = 10 pulses/second). I have no idea about the time request to process an interrupt (the ISR is quite short), but one can assume that it may affect significantly the time elapsed between two sent. Any opinion on that point ?
Correct me if I am wrong but one can't measure the exact elapsed time between two sent with millis() or micros() because these functions are not incrementing during an ISR.
So the solution would be to set up a timer interrupt to calculate kWh and send data at very precise rate. But I don't know if timer interrupt and pulse interrupt can coexist in the same sketch. I don't know either how to make the emontx sleep at low-power between two sent.
Some inputs ?
Re: Calculating Wh totals in the discrete sampling sketch
Hi,
Finally, I added the Wh totals calculation in the emonTxV3_2_DiscreteSampling sketch (sorry, I have no TX3.4) simply by measuring the exact elapsed time between two calculation with millis().
First, I modified the emonTX payload :
Before calculating power and energy, it measures the time since the last calculation
Then it calculates the totals Wh just before updating the power like this :
As I will not try to catch interrupt with the same TX, nor try to measure temperature, it should work fine.
Doing that, I noticed that the real time between two sent is 11,2 seconds + few ms whereas the constant TIME_BETWEEN_READINGS was 10. When logging data every 10s in emoncms, many data are lost (10%). It can be problematic when using some process/grah
200 ms are "lost" here :
One second is lost anywhere else (during the sampling ?)
So, I made some modification to get a time between two sent equal to 10s + few ms.
A good solution would be to set up a timer interrupt to calculate kWh and send data at very precise rate. Will it work with pulse counting or temperature sensing ? I will have a look on that later.
Eric
Re: Calculating Wh totals in the discrete sampling sketch
Eric,
TIME_BETWEEN_READINGS is actually the delay while the processor sleeps in low power mode (as you've discovered). The extra time is that taken to make the readings (200 ms per CT) plus the time to calculate the averages and process the result, get the temperature (if required), print the results to serial (if you're doing that) and to send the data.


Home
About
Donít die without embracing the daring adventure your life was meant to be. Ė Steve Pavlina
Explore


--- layout: page title: "Welcome" permalink: /welcome.html dynamic_title: true ---
Thank you for subscribing 🎉 Welcome to Weekly Five!
Head back Home


{{ define "main" }} {{partial "name.html" . }} {{partial "image.html" .}} {{partial "bio.html" .}} {{partial "footer.html" .}} {{ end }}


This code is given away under the BSD license. However, if you do use it, please send me a post card or (better) a copy of the Blu-Ray disc title it's used for, or some other copy of the enhancement (perhaps a video capture for an MHP/OCAP app?).
You can find me at my vanity domain, http://jovial.com. Just send me an e-mail for my postal address.
Thanks!
-- Bill


Class rex_form_element
Direct known subclasses
rex_form_container_element
,
rex_form_control_element
,
rex_form_options_element
,
rex_form_raw_element
,
rex_form_select_element
,
rex_form_widget_linklist_element
,
rex_form_widget_linkmap_element
,
rex_form_widget_media_element
,
rex_form_widget_medialist_element
Indirect known subclasses
rex_form_checkbox_element
,
rex_form_prio_element
,
rex_form_radio_element
Methods summary
public
|
#
__construct( mixed $tag,
|
|
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
public
|
||
protected
|
||
protected
|
||
public
|
||
protected
|
||
protected
|
||
protected
|
||
protected
|
||
public
|
||
public
|
Properties summary
protected
mixed
|
$value
|
|
protected
string
|
$defaultSaveValue
|
# '' |
protected
mixed
|
$label
|
|
protected
mixed
|
$tag
|
|
protected
mixed
|
$table
|
|
protected
mixed
|
$attributes
|
|
protected
mixed
|
$separateEnding
|
|
protected
mixed
|
$fieldName
|
|
protected
mixed
|
$header
|
|
protected
mixed
|
$footer
|
|
protected
mixed
|
$prefix
|
|
protected
mixed
|
$suffix
|
|
protected
mixed
|
$notice
|
|
protected
|
$validator
|


DateTextBox is optimized to handle the short date format commonly used to enter dates. In the U.S., the seventh day of December, 2012, is written in short date format as "12/7/2012".
If the jQuery Globalize library is loaded, the short date format is determined from the current culture. E.g., in France, the above date would be entered by typing "7/12/2012" (with day before month). All other date formats defined by Globalize are also accepted. If Globalize is not present, a simple parser is used that can accept U.S.-style short dates.
With or without Globalize, DateTextBox also supports abbreviated forms of the short date format that allow a two-digit year or a missing year. So, in the U.S., 12/7/2012 can be entered as "12/7/12" or (in the year 2012), "12/7".


Overview
Package
Class
Use
Tree
Deprecated
Index
Help
IAIK PKCS#11 Wrapper
version 1.2.17
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
Y
T
TLS_KEY_AND_MAC_DERIVE
- Static variable in class iaik.pkcs.pkcs11.
Mechanism
TLS_MASTER_KEY_DERIVE
- Static variable in class iaik.pkcs.pkcs11.
Mechanism
TLS_MASTER_KEY_DERIVE_DH
- Static variable in class iaik.pkcs.pkcs11.
Mechanism
TLS_PRE_MASTER_KEY_GEN
- Static variable in class iaik.pkcs.pkcs11.
Mechanism
TLS_PRF
- Static variable in class iaik.pkcs.pkcs11.
Mechanism
TOKEN
- Static variable in class iaik.pkcs.pkcs11.objects.
Attribute
TOKEN_PRESENT
- Static variable in interface iaik.pkcs.pkcs11.
Module.SlotRequirement
Causes getSlotList to return only those slots in which there is currently a token present; e.g. there is a smart card in the reader's slot.
TRUE
- Static variable in interface iaik.pkcs.pkcs11.wrapper.
PKCS11Constants
TRUSTED
- Static variable in class iaik.pkcs.pkcs11.objects.
Attribute
TWOFISH
- Static variable in interface iaik.pkcs.pkcs11.objects.
Key.KeyType
The identifier for a Twofish key.
Token
- class iaik.pkcs.pkcs11.
Token
.
Objects of this class represent PKCS#11 tokens.
Token(Slot)
- Constructor for class iaik.pkcs.pkcs11.
Token
The constructor that takes a reference to the module and the slot ID.
Token.SessionReadWriteBehavior
- interface iaik.pkcs.pkcs11.
Token.SessionReadWriteBehavior
.
This interface defines constants that specify the read/write behavior of a session.
Token.SessionType
- interface iaik.pkcs.pkcs11.
Token.SessionType
.
This interface defines constants for the type of session that should be opened upon a call to openSession.
TokenException
- exception iaik.pkcs.pkcs11.
TokenException
.
The base class for all exceptions in this package.
TokenException()
- Constructor for class iaik.pkcs.pkcs11.
TokenException
The default constructor.
TokenException(String)
- Constructor for class iaik.pkcs.pkcs11.
TokenException
Constructor taking an exception message.
TokenException(Exception)
- Constructor for class iaik.pkcs.pkcs11.
TokenException
Constructor taking an other exception to wrap.
TokenException(String, Exception)
- Constructor for class iaik.pkcs.pkcs11.
TokenException
Constructor taking a message for this exception and an other exception to wrap.
TokenInfo
- class iaik.pkcs.pkcs11.
TokenInfo
.
Objects of this class provide information about a token.
TokenInfo(CK_TOKEN_INFO)
- Constructor for class iaik.pkcs.pkcs11.
TokenInfo
Constructor taking CK_TOKEN_INFO as given returned by PKCS11.C_GetTokenInfo.
TokenRuntimeException
- exception iaik.pkcs.pkcs11.
TokenRuntimeException
.
The base class for all runtiem exceptions in this package.
TokenRuntimeException()
- Constructor for class iaik.pkcs.pkcs11.
TokenRuntimeException
The default constructor.
TokenRuntimeException(String)
- Constructor for class iaik.pkcs.pkcs11.
TokenRuntimeException
Constructor taking an exception message.
TokenRuntimeException(Exception)
- Constructor for class iaik.pkcs.pkcs11.
TokenRuntimeException
Constructor taking an other exception to wrap.
TokenRuntimeException(String, Exception)
- Constructor for class iaik.pkcs.pkcs11.
TokenRuntimeException
Constructor taking a message for this exception and an other exception to wrap.
TwofishSecretKey
- class iaik.pkcs.pkcs11.objects.
TwofishSecretKey
.
Objects of this class represent Twofish secret keys as specified by PKCS#11 v2.20.
TwofishSecretKey()
- Constructor for class iaik.pkcs.pkcs11.objects.
TwofishSecretKey
Deafult Constructor.
TwofishSecretKey(Session, long)
- Constructor for class iaik.pkcs.pkcs11.objects.
TwofishSecretKey
Called by getInstance to create an instance of a PKCS#11 generic secret key.
template_
- Variable in class iaik.pkcs.pkcs11.objects.
AttributeArray
The attributes of this attribute array in their object class representation.
time_
- Variable in class iaik.pkcs.pkcs11.
TokenInfo
The current time on the token.
toBinaryString(long)
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a long value to a binary String.
toBinaryString(byte[])
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a byte array to a binary String.
toCharArray(int, int)
- Static method in class iaik.pkcs.pkcs11.
Util
Converts the given number into a char-array.
toFullHexString(long)
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a long value to a hexadecimal String of length 16.
toFullHexString(int)
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a int value to a hexadecimal String of length 8.
toHexString(long)
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a long value to a hexadecimal String.
toHexString(byte[])
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts a byte array to a hexadecimal String.
toPaddedCharArray(String, int, char)
- Static method in class iaik.pkcs.pkcs11.
Util
Converts the given string to a char-array of exactly the given length.
toString()
- Method in class iaik.pkcs.pkcs11.
DefaultInitializeArgs
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Info
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Mechanism
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
MechanismInfo
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Module
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Session
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
SessionInfo
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Slot
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
SlotInfo
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
State
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
Token
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
TokenException
Returns the string representation of this exception, including the string representation of the wrapped (encapsulated) exception.
toString()
- Method in class iaik.pkcs.pkcs11.
TokenInfo
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.
TokenRuntimeException
Returns the string representation of this exception, including the string representation of the wrapped (encapsulated) exception.
toString()
- Method in class iaik.pkcs.pkcs11.
Version
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
AESSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Attribute
Get a string representation of this attribute.
toString(boolean)
- Method in class iaik.pkcs.pkcs11.objects.
Attribute
Get a string representation of this attribute.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
BatonSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
BlowfishSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
CAST128SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
CAST3SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
CAST5SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
CASTSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
CDMFSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Certificate
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Clock
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DES2SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DES3SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DESSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DHParams
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DHPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DHPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DSAParams
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DSAPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DSAPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Data
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
DomainParameters
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
ECDSAPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
ECDSAPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
GenericSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
GenericTemplate
This method returns a string representation of the current object.
toString(boolean, boolean, String)
- Method in class iaik.pkcs.pkcs11.objects.
GenericTemplate
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
HardwareFeature
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
IDEASecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
JuniperSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
KEAPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
KEAPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Key
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
KeyPair
This method returns a string representation of the current object.
toString(int)
- Method in class iaik.pkcs.pkcs11.objects.
LongAttribute
Get a string representation of this attribute.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
MonotonicCounter
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Object
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
PrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
PublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
RC2SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
RC4SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
RC5SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
RSAPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
RSAPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
SecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
SkipJackSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
Storage
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
TwofishSecretKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
X509AttributeCertificate
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
X509PublicKeyCertificate
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
X942DHParams
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
X942DHPrivateKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.objects.
X942DHPublicKey
This method returns a string representation of the current object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
CbcEncryptDataParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
DHKeyDerivationParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
DHPkcsDeriveParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
EcDH1KeyDerivationParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
EcDH2KeyDerivationParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
ExtractParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
InitializationVectorParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
KEADeriveParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
KeyDerivationStringDataParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
KeyWrapSetOaepParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
MacGeneralParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
ObjectHandleParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
PBEParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
PKCS5PBKD2Parameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC2CbcParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC2MacGeneralParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC2Parameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC5CbcParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC5MacGeneralParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RC5Parameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RSAPkcsOaepParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RSAPkcsParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
RSAPkcsPssParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SSL3KeyMaterialOutParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SSL3KeyMaterialParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SSL3MasterKeyDeriveParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SSL3RandomDataParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SkipJackPrivateWrapParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
SkipJackRelayXParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
X942DH1KeyDerivationParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.parameters.
X942DH2KeyDerivationParameters
Returns the string representation of this object.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_AES_CBC_ENCRYPT_DATA_PARAMS
Returns the string representation of CK_AES_CBC_ENCRYPT_DATA_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_ATTRIBUTE
Returns the string representation of CK_ATTRIBUTE.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_DATE
Returns the string representation of CK_DATE.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_DES_CBC_ENCRYPT_DATA_PARAMS
Returns the string representation of CK_DES_CBC_ENCRYPT_DATA_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_ECDH1_DERIVE_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_ECDH2_DERIVE_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_INFO
Returns the string representation of CK_INFO.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_KEA_DERIVE_PARAMS
Returns the string representation of CK_KEA_DERIVE_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_KEY_WRAP_SET_OAEP_PARAMS
Returns the string representation of CK_KEY_WRAP_SET_OAEP_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_MECHANISM
Returns the string representation of CK_MECHANISM.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_MECHANISM_INFO
Returns the string representation of CK_MECHANISM_INFO.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_PBE_PARAMS
Returns the string representation of CK_PBE_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_PKCS5_PBKD2_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RC2_CBC_PARAMS
Returns the string representation of CK_RC2_CBC_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RC2_MAC_GENERAL_PARAMS
Returns the string representation of CK_RC2_MAC_GENERAL_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RC5_CBC_PARAMS
Returns the string representation of CK_RC5_CBC_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RC5_MAC_GENERAL_PARAMS
Returns the string representation of CK_RC5_MAC_GENERAL_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RC5_PARAMS
Returns the string representation of CK_RC5_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RSA_PKCS_OAEP_PARAMS
Returns the string representation of CK_RSA_PKCS_OAEP_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_RSA_PKCS_PSS_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SESSION_INFO
Returns the string representation of CK_SESSION_INFO.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SKIPJACK_PRIVATE_WRAP_PARAMS
Returns the string representation of CK_SKIPJACK_PRIVATE_WRAP_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SKIPJACK_RELAYX_PARAMS
Returns the string representation of CK_SKIPJACK_RELAYX_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SLOT_INFO
Returns the string representation of CK_SLOT_INFO.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SSL3_KEY_MAT_OUT
Returns the string representation of CK_SSL3_KEY_MAT_OUT.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SSL3_KEY_MAT_PARAMS
Returns the string representation of CK_SSL3_KEY_MAT_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SSL3_MASTER_KEY_DERIVE_PARAMS
Returns the string representation of CK_SSL3_MASTER_KEY_DERIVE_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_SSL3_RANDOM_DATA
Returns the string representation of CK_SSL3_RANDOM_DATA.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_TOKEN_INFO
Returns the string representation of CK_TOKEN_INFO.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_VERSION
Returns the string representation of CK_VERSION.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_X9_42_DH1_DERIVE_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
CK_X9_42_DH2_DERIVE_PARAMS
Returns the string representation of CK_PKCS5_PBKD2_PARAMS.
toString()
- Method in class iaik.pkcs.pkcs11.wrapper.
PKCS11Implementation
Returns the string representation of this object.
tokenInfoFlagsToString(long)
- Static method in class iaik.pkcs.pkcs11.wrapper.
Functions
Converts long value flags to a TokenInfoFlag string.
tokenInitialized_
- Variable in class iaik.pkcs.pkcs11.
TokenInfo
True, if the token is already initialized.
tokenPresent_
- Variable in class iaik.pkcs.pkcs11.
SlotInfo
Indicates, if a token is present.
token_
- Variable in class iaik.pkcs.pkcs11.
Session
The token to perform the operations on.
token_
- Variable in class iaik.pkcs.pkcs11.objects.
Storage
True, if object is a token object (not a session object).
totalPrivateMemory_
- Variable in class iaik.pkcs.pkcs11.
TokenInfo
The total amount of memory for private objects on this token.
totalPublicMemory_
- Variable in class iaik.pkcs.pkcs11.
TokenInfo
The total amount of memory for public objects on this token.
trusted_
- Variable in class iaik.pkcs.pkcs11.objects.
Certificate
Indicates, if this certificate can be trusted.
trusted_
- Variable in class iaik.pkcs.pkcs11.objects.
PublicKey
True, if this public key can be used for wrapping other keys.
trusted_
- Variable in class iaik.pkcs.pkcs11.objects.
SecretKey
True, if this public key can be used for wrapping other keys.
type
- Variable in class iaik.pkcs.pkcs11.wrapper.
CK_ATTRIBUTE
PKCS#11:
CK_ATTRIBUTE_TYPE type;
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
IAIK PKCS#11 Wrapper
version 1.2.17
PREV LETTER
NEXT LETTER
FRAMES
NO FRAMES
All Classes
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
R
S
T
U
V
W
X
Y
IAIK JavaSecurity Website
http://jce.iaik.tugraz.at/
IAIK at Graz University of Technology, Austria, Europe
Copyright 2001-2002, IAIK, Graz University of Technology, Inffeldgasse 16a, 8010 Graz, Austria. All Rights Reserved.


registration now
Enter your personal details below
Male
Female
Enter your account details below
I agree to the Terms of Service and Privacy Policy
Submit
Already Registered.
Login


OAuth
- Web Application Flow
- Non-Web Application Flow
- Redirect URLs
- Scopes
- Common errors for the authorization request
- Common errors for the access token request
- Directing users to review their access for an application
OAuth2 is a protocol that lets external applications request authorization to private details in a user's GitHub account without getting their password. This is preferred over Basic Authentication because tokens can be limited to specific types of data, and can be revoked by users at any time.
All developers need to register their application before getting started. A registered OAuth application is assigned a unique Client ID and Client Secret. The Client Secret should not be shared. You may create a personal access token for your own use or implement the web flow below to allow other users to authorize your application.
GitHub's OAuth implementation supports the standard authorization code grant type. Developers should implement the web application flow described below to obtain an authorization code and then exchange it for a token. (The implicit grant type is not supported.)
Web Application Flow
This is a description of the OAuth2 flow from 3rd party web sites.
1. Redirect users to request GitHub access
GET https://github.com/login/oauth/authorize
Parameters
| Name | Type | Description |
|---|---|---|
client_id |
string |
Required. The client ID you received from GitHub when you registered. |
redirect_uri |
string |
The URL in your application where users will be sent after authorization. See details below about redirect urls. |
scope |
string |
A space delimited list of scopes. If not provided, scope defaults to an empty list for users that have not authorized any scopes for the application. For users who have authorized scopes for the application, the user won't be shown the OAuth authorization page with the list of scopes. Instead, this step of the flow will automatically complete with the set of scopes the user has authorized for the application. For example, if a user has already performed the web flow twice and has authorized one token with user scope and another token with repo scope, a third web flow that does not provide a scope will receive a token with user and repo scope. |
state |
string |
An unguessable random string. It is used to protect against cross-site request forgery attacks. |
allow_signup |
string |
Whether or not unauthenticated users will be offered an option to sign up for GitHub during the OAuth flow. The default is true . Use false in the case that a policy prohibits signups. |
2. GitHub redirects back to your site
If the user accepts your request, GitHub redirects back to your site
with a temporary code in a code
parameter as well as the state you provided in
the previous step in a state
parameter. If the states don't match, the request
has been created by a third party and the process should be aborted.
Exchange this for an access token:
POST https://github.com/login/oauth/access_token
Parameters
| Name | Type | Description |
|---|---|---|
client_id |
string |
Required. The client ID you received from GitHub when you registered. |
client_secret |
string |
Required. The client secret you received from GitHub when you registered. |
code |
string |
Required. The code you received as a response to Step 1. |
redirect_uri |
string |
The URL in your application where users will be sent after authorization. See details below about redirect urls. |
state |
string |
The unguessable random string you optionally provided in Step 1. |
Response
By default, the response will take the following form:
access_token=e72e16c7e42f292c6912e7710c838347ae178b4a&scope=user%2Cgist&token_type=bearer
You can also receive the content in different formats depending on the Accept header:
Accept: application/json
{"access_token":"e72e16c7e42f292c6912e7710c838347ae178b4a", "scope":"repo,gist", "token_type":"bearer"}
Accept: application/xml
<OAuth>
<token_type>bearer</token_type>
<scope>repo,gist</scope>
<access_token>e72e16c7e42f292c6912e7710c838347ae178b4a</access_token>
</OAuth>
Multiple tokens
GitHub allows multiple tokens to exist for a user/application/scope combination. This lets you create tokens for specific use cases. For example, your application might support one workflow that uses GitHub for sign in and only requires basic user information. Another workflow might require access to a user's private repositories. Using multiple tokens, your application can perform the web flow for each use case, requesting only the scopes needed. If a user only uses your application to sign in, they are never required to grant your application access to their private repositories. Note, there is a limit to the number of tokens that are issued per user/application/scope combination. If your application requests enough tokens to go over one of the limits, older tokens will stop working.
Warning: Revoking all of a user's access to an application deletes any SSH keys the application generated on behalf of the user, including deploy keys.
Requested scopes vs. granted scopes
The scope
attribute lists scopes attached to the token that were granted by
the user. Normally, these scopes will be identical to what you requested.
However, users will soon be able to edit their scopes, effectively
granting your application less access than you originally requested. Also, users
will also be able to edit token scopes after the OAuth flow completed.
You should be aware of this possibility and adjust your application's behavior
accordingly.
It is important to handle error cases where a user chooses to grant you less access than you originally requested. For example, applications can warn or otherwise communicate with their users that they will see reduced functionality or be unable to perform some actions.
Also, applications can always send users back through the flow again to get additional permission, but don’t forget that users can always say no.
Check out the Basics of Authentication guide which provides tips on handling modifiable token scopes.
Normalized scopes
When requesting multiple scopes, the token will be saved with a normalized list
of scopes, discarding those that are implicitly included by another requested
scope. For example, requesting user,gist,user:email
will result in a
token with user
and gist
scopes only since the access granted with
user:email
scope is included in the user
scope.
3. Use the access token to access the API
The access token allows you to make requests to the API on a behalf of a user.
GET https://api.github.com/user?access_token=...
You can pass the token in the query params like shown above, but a cleaner approach is to include it in the Authorization header
Authorization: token OAUTH-TOKEN
For example, in curl you can set the Authorization header like this:
curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/user
Non-Web Application Flow
Use Basic Authentication to create an OAuth2 token using the interface below. With this technique, a username and password need not be stored permanently, and the user can revoke access at any time. (Make sure to understand how to work with two-factor authentication if you or your users have two-factor authentication enabled.)
Redirect URLs
The redirect_uri
parameter is optional. If left out, GitHub will
redirect users to the callback URL configured in the OAuth Application
settings. If provided, the redirect URL's host and port must exactly
match the callback URL. The redirect URL's path must reference a
subdirectory of the callback URL.
CALLBACK: http://example.com/path
GOOD: http://example.com/path
GOOD: http://example.com/path/subdir/other
BAD: http://example.com/bar
BAD: http://example.com/
BAD: http://example.com:8080/path
BAD: http://oauth.example.com:8080/path
BAD: http://example.org
Scopes
Scopes let you specify exactly what type of access you need. Scopes limit access for OAuth tokens. They do not grant any additional permission beyond that which the user already has.
For the web flow, requested scopes will be displayed to the user on the authorize form.
Check headers to see what OAuth scopes you have, and what the API action accepts.
curl -H "Authorization: token OAUTH-TOKEN" https://api.github.com/users/technoweenie -I
HTTP/1.1 200 OK
X-OAuth-Scopes: repo, user
X-Accepted-OAuth-Scopes: user
X-OAuth-Scopes
lists the scopes your token has authorized.
X-Accepted-OAuth-Scopes
lists the scopes that the action checks for.
| Name | Description |
|---|---|
(no scope) |
Grants read-only access to public information (includes public user profile info, public repository info, and gists) |
user |
Grants read/write access to profile info only. Note that this scope includes user:email and user:follow . |
user:email |
Grants read access to a user's email addresses. |
user:follow |
Grants access to follow or unfollow other users. |
public_repo |
Grants read/write access to code, commit statuses, collaborators, and deployment statuses for public repositories and organizations. Also required for starring public repositories. |
repo |
Grants read/write access to code, commit statuses, repository invitations, collaborators, and deployment statuses for public and private repositories and organizations. |
repo_deployment |
Grants access to deployment statuses for public and private repositories. This scope is only necessary to grant other users or services access to deployment statuses, without granting access to the code. |
repo:status |
Grants read/write access to public and private repository commit statuses. This scope is only necessary to grant other users or services access to private repository commit statuses without granting access to the code. |
delete_repo |
Grants access to delete adminable repositories. |
notifications |
Grants read access to a user's notifications. repo also provides this access. |
gist |
Grants write access to gists. |
read:repo_hook |
Grants read and ping access to hooks in public or private repositories. |
write:repo_hook |
Grants read, write, and ping access to hooks in public or private repositories. |
admin:repo_hook |
Grants read, write, ping, and delete access to hooks in public or private repositories. |
admin:org_hook |
Grants read, write, ping, and delete access to organization hooks. Note: OAuth tokens will only be able to perform these actions on organization hooks which were created by the OAuth application. Personal access tokens will only be able to perform these actions on organization hooks created by a user. |
read:org |
Read-only access to organization, teams, and membership. |
write:org |
Publicize and unpublicize organization membership. |
admin:org |
Fully manage organization, teams, and memberships. |
read:public_key |
List and view details for public keys. |
write:public_key |
Create, list, and view details for public keys. |
admin:public_key |
Fully manage public keys. |
read:gpg_key |
List and view details for GPG keys. |
write:gpg_key |
Create, list, and view details for GPG keys. |
admin:gpg_key |
Fully manage GPG keys. |
NOTE: Your application can request the scopes in the initial redirection. You can specify multiple scopes by separating them with a space:
https://github.com/login/oauth/authorize?
client_id=...&
scope=user%20public_repo
Common errors for the authorization request
There are a few things that can go wrong in the process of obtaining an OAuth token for a user. In the initial authorization request phase, these are some errors you might see:
Application Suspended
If the OAuth application you set up has been suspended (due to reported abuse, spam, or a mis-use of the API), GitHub will redirect to the registered callback URL with the following parameters summarizing the error:
http://your-application.com/callback?error=application_suspended
<EMAIL_ADDRESS>&error_uri=https://developer.github.com/v3/oauth/%23application-suspended
&state=xyz
Please contact support to solve issues with suspended applications.
Redirect URI mismatch
If you provide a redirect_uri that doesn't match what you've registered with your application, GitHub will redirect to the registered callback URL with the following parameters summarizing the error:
http://your-application.com/callback?error=redirect_uri_mismatch
&error_description=The+redirect_uri+MUST+match+the+registered+callback+URL+for+this+application.
&error_uri=https://developer.github.com/v3/oauth/%23redirect-uri-mismatch
&state=xyz
To correct this error, either provide a redirect_uri that matches what you registered or leave out this parameter to use the default one registered with your application.
Access denied
If the user rejects access to your application, GitHub will redirect to the registered callback URL with the following parameters summarizing the error:
http://your-application.com/callback?error=access_denied
&error_description=The+user+has+denied+your+application+access.
&error_uri=https://developer.github.com/v3/oauth/%23access-denied
&state=xyz
There's nothing you can do here as users are free to choose not to use your application. More often than not, users will just close the window or press back in their browser, so it is likely that you'll never see this error.
Common errors for the access token request
In the second phase of exchanging a code for an access token, there are an additional set of errors that can occur. The format of these responses is determined by the accept header you pass. The following examples only show JSON responses.
Incorrect client credentials
If the client_id and or client_secret you pass are incorrect you will receive this error response.
{
"error": "incorrect_client_credentials",
"error_description": "The client_id and/or client_secret passed are incorrect.",
"error_uri": "https://developer.github.com/v3/oauth/#incorrect-client-credentials"
}
To solve this error, go back and make sure you have the correct
credentials for your oauth application. Double check the client_id
and
client_secret
to make sure they are correct and being passed correctly
to GitHub.
Redirect URI mismatch(2)
If you provide a redirect_uri that doesn't match what you've registered with your application, you will receive this error message:
{
"error": "redirect_uri_mismatch",
"error_description": "The redirect_uri MUST match the registered callback URL for this application.",
"error_uri": "https://developer.github.com/v3/oauth/#redirect-uri-mismatch(2)"
}
To correct this error, either provide a redirect_uri that matches what you registered or leave out this parameter to use the default one registered with your application.
Bad verification code
{
"add_scopes": [
"repo"
],
"note": "admin script"
}
If the verification code you pass is incorrect, expired, or doesn't match what you received in the first request for authorization you will receive this error.
{
"error": "bad_verification_code",
"error_description": "The code passed is incorrect or expired.",
"error_uri": "https://developer.github.com/v3/oauth/#bad-verification-code"
}
To solve this error, start the OAuth process over from the beginning and get a new code.
Directing users to review their access for an application
Users can review and revoke their application authorizations from the settings screen within GitHub. A user's organizations control whether an application can access organization data. Integrators can deep link to the authorization information for their particular application to let their end users review these details.
To build this link, you'll need your OAuth application's client_id
you
received from GitHub when you registered the application.
https://github.com/settings/connections/applications/:client_id
For tips on discovering the resources that your application can access for a user, be sure to check out our guide.


Immerse yourself in the culture around you. Learn, share, and love where you are.
DiscoverOver 8 million people live in the Big Apple, the heart of phenomenal nightlife and entertainment. Join them in a walk around Times Square and you'll never feel alone.
From being home to the tallest building in the world and man-made islands, Dubai is an urban fantasy. Explore the incredible City of Gold on a walk in downtown Dubai.
Without doubt, a city awarded the Royal Gold Medal for architecture by Royal Institute of British Architects, is a city worth visiting. Take a nice stroll down the streets of Barcelona.