Skip to content

Commit 1ce38bb

Browse files
author
Aidan Laing
committed
Manifest Read Me Moved
1 parent b8df236 commit 1ce38bb

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,20 @@ dependencies {
2525
### Prerequisites
2626
A Red Hat Single Sign-On server component that is setup to handle an OAuth2 authorization code flow.
2727

28+
### Android Manifest
29+
You will need to add this to your AndroidManifest and specify what custom schema you're using in your redirectUri.
30+
```xml
31+
<activity android:name="ca.bc.gov.mobileauthentication.screens.redirect.RedirectActivity"
32+
android:launchMode="singleInstance">
33+
<intent-filter android:autoVerify="true">
34+
<action android:name="android.intent.action.VIEW" />
35+
<category android:name="android.intent.category.DEFAULT" />
36+
<category android:name="android.intent.category.BROWSABLE" />
37+
<data android:scheme="<YOUR_CUSTOM_SCHEME_USED_IN_REDIRECT_URI>" />
38+
</intent-filter>
39+
</activity>
40+
```
41+
2842
## Usage
2943
There are four main commands for handling tokens that will be called using the MobileAuthenticationClient class.
3044
1. Authenticate
@@ -34,8 +48,6 @@ There are four main commands for handling tokens that will be called using the M
3448

3549
### Mobile Authentication Client
3650
Creating a MobileAuthenticationClient:
37-
The parameters needed for the client can all be found on your Red Hat Single Sign-On dashboard.
38-
We recommened you use a custom application schema for your redirectUri such as <NAME_OF_YOUR_APP>://android
3951
```kotlin
4052
val authEndpoint = "<YOUR_BASE_URL>/auth/realms/<YOUR_REALM_NAME>/protocol/openid-connect/auth"
4153
val baseUrl = "<YOUR_BASE_URL>"
@@ -45,22 +57,11 @@ val redirectUri = "<YOUR_REDIRECT_URI>"
4557

4658
val client = MobileAuthenticationClient(context, baseUrl, realmName, authEndpoint, redirectUri, clientId)
4759
```
60+
The parameters needed for the client can all be found on your Red Hat Single Sign-On dashboard.
61+
We recommened you use a custom application schema for your redirectUri such as <NAME_OF_YOUR_APP>://android
4862

4963
Please remember to call `client.clear()` in either `onPause()`, `onStop()` or `onDestroy()` in order to avoid memory leaks.
5064

51-
### Android Manifest
52-
You will need to add this to your AndroidManifest and specify what custom schema you're using in your redirectUri.
53-
```xml
54-
<activity android:name="ca.bc.gov.mobileauthentication.screens.redirect.RedirectActivity"
55-
android:launchMode="singleInstance">
56-
<intent-filter android:autoVerify="true">
57-
<action android:name="android.intent.action.VIEW" />
58-
<category android:name="android.intent.category.DEFAULT" />
59-
<category android:name="android.intent.category.BROWSABLE" />
60-
<data android:scheme="<YOUR_CUSTOM_SCHEME_USED_IN_REDIRECT_URI>" />
61-
</intent-filter>
62-
</activity>
63-
```
6465

6566

6667

0 commit comments

Comments
 (0)