Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Adds Azure AD provider #170

Closed
wants to merge 2 commits into from
Closed

Adds Azure AD provider #170

wants to merge 2 commits into from

Conversation

eelcocramer
Copy link
Contributor

Like mentioned in #114.

To get the mail address of a authenticated user from the Microsoft Graph API it is needed to access Azure AD protected resource (ie. https://graph.windows.net). For this a resource header needs to be added to redeem request.

This PR adds the following command line options:

---azure-tenant <string>: to go to a tenant-specific Azure AD endpoint. (defaults to the "common" endpoint)
---resource <string>: the url of a protected resource.

@eelcocramer
Copy link
Contributor Author

Is something holding this PR back?

@jehiah
Copy link
Member

jehiah commented Jan 19, 2016

@eelcocramer sorry, this dropped off my radar. Thanks for expanding the provider list with Azure! The changes you made all look good (and I assume you are already using this in a production environment?)

Can you squash down to a single commit before we merge this in?

Updates readme and help

Adds azure to the providers.

Fixes race condition

Sometimes, during tests, a race condition occurs. Using `break` instead
of `return` fixes this for me.

Tries to read mail address

Tries to read mail address from the Graph API. Currently this
has not been tested properly.

Adds resource parameter

Uses to gain access to protected resources when redeeming the token.

Gets the mail address from the graph

*: rename Url to URL everywhere

Go coding style says that acronyms should be all lower or all upper. Fix
Url to URL.

oauthproxy: rename Uri to URI

Be consistent with Go coding style for acroynyms.

*: rename Oauth to OAuth

Be consistent with Go capitalization styling and use a single way of
spelling this across the tree.

Add /auth endpoint to support Nginx's auth_request

Closes bitly#152.

Extract Authenticate for Proxy, AuthenticateOnly

Add nginx auth_request config to README

Sign Upstream requests with HMAC. closes bitly#147

Renames var ending on Url to URL

Simplifies configuration for brevity
@eelcocramer
Copy link
Contributor Author

I've squashed the commits.

I'm not using the code in production yet but a proxy with this code is running in our dev environment and is used there.

@jehiah
Copy link
Member

jehiah commented Jan 20, 2016

merged as 10f47e3

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

Successfully merging this pull request may close these issues.

2 participants