Skip to content

Commit f1ba4ba

Browse files
Updated readme for v8 config
1 parent c7b0cb2 commit f1ba4ba

File tree

1 file changed

+18
-5
lines changed

1 file changed

+18
-5
lines changed

README.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,29 @@ AuthU is an add-on library to [Umbraco](https://github.com/umbraco/umbraco-cms)
1010
There's also a nightly Nuget feed: [`https://www.myget.org/F/umbraco-authu/api/v2`](https://www.myget.org/F/umbraco-authu/api/v2)
1111

1212
## Configuration
13-
AuthU is configured using the `OAuth.ConfigureEndpoint` helper inside an Umbraco `ApplicationEventHandler` like so:
14-
````csharp
15-
public class Boostrap : ApplicationEventHandler
13+
In order to configure AuthU you will first of all need to create an Umbraco composer + compontent combination like so:
14+
````csharp
15+
public class AuthUConfigComponent : IComponent
1616
{
17-
protected override void ApplicationStarted(UmbracoApplicationBase app, ApplicationContext ctx)
17+
public void Initialize()
1818
{
19-
OAuth.ConfigureEndpoint(...);
19+
// Configuration goes here
2020
}
21+
22+
public void Terminate() { }
2123
}
24+
25+
public class AuthUConfigComposer : ComponentComposer<AuthUConfigComponent>
26+
{ }
2227
````
28+
29+
From within the `Initialize` method, you can then configure your endpoint(s) via the `OAuth.ConfigureEndpoint` helper like so:
30+
````csharp
31+
...
32+
OAuth.ConfigureEndpoint(...);
33+
...
34+
````
35+
2336
### Basic Configuration
2437
For the most basic OAuth implementation, the following minimal configuration is all that is needed:
2538
````csharp

0 commit comments

Comments
 (0)