Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a new IRockOwinStartup interface for allowing plugins to implement OWIN functionality. #2142

Merged

Conversation

cbump
Copy link
Contributor

@cbump cbump commented Apr 10, 2017

Contributor Agreement

Have you filled out and sent your Spark Contributor Agreement to secretary [at] sparkdevnetwork.org?
Yes

Context

What is the problem you encountered that lead to you creating this pull request?
We wanted to be able to have plugins hook into OWIN startup in addition to the Application Startup that is already in Rock. OWIN provides additional functionality and a deeper level of access to IIS that isn't available via standard the standard application startup.

Goal

What will this pull request achieve and how will this fix the problem?
This adds the ability for a plugin to hook into OWIN.

Strategy

How have you implemented your solution?
This is essentially the same functionality that already exists with the IRockStartup interface but uses the OWIN architecture instead of the standard Application Startup that the other interface uses.

Tests

If your code is a new method or function (that doesn't need a mock database or SqlServerTypes library) and can be Xunit tested see example be sure your pull request includes the corresponding unit tests in the Rock.Tests project. In all cases you MUST test your code before submitting a pull request.
I don't think we need to provide any additional testing.

Possible Implications

What could this change potentially impact? Are there any security considerations? Where could this potentially affect backwards compatibility?
To my knowledge, this shouldn't affect anything.

Screenshots

Provide us some screenshots if your pull request either alters existing UI or provides new UI. Arrows and labels are helpful.
N/A

Documentation

If your change effects the UI or needs to be documented in one of the existing user guides, please provide the brief write-up here:
We might want to provide a section in the documentation explaining how to add startup functionality with a plugin and when to choose IRockStartup vs IRockOwinStartup: https://www.rockrms.com/Rock/Developer/BookContent/26/26

Copy link
Contributor

@azturner azturner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@azturner
Copy link
Contributor

@cbump I am curious though about what properties you needed from the IAppBuilder param that Owin gives you?

@cbump
Copy link
Contributor Author

cbump commented Apr 12, 2017

I'm still trying to get a plugin in for a hosted OAuth server into the Rock shop: https://docs.microsoft.com/en-us/aspnet/aspnet/overview/owin-and-katana/owin-oauth-20-authorization-server

You can see it working if you do this:

  1. Go here - https://secc.servicereef.com/
  2. Click "Sign In" at the top right of the page.
  3. Click "Southeast Account" and you'll be presented with a login that's actually hosted in Rock.

We are also planning to use OAuth for mobile authentication as well so we can store a standard OAuth refresh token on a device rather than having to store a password or some other custom token.

@azturner azturner merged commit a86520a into SparkDevNetwork:develop Apr 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants