Mobile User Management
Oracle Mobile Cloud Service manages the users of your apps and their permissions through realms and roles. You use the Mobile User Management web interface in MCS to set up users, roles, and realms.
Note: Before you start, complete the Get Started with Mobile Development tutorial that is offered within Oracle Mobile Cloud Service on its Home page. That tutorial provides the mobile backend and sample app that you will use here.
In addition, you need to have the MobileEnvironment_MobileUserConfig and MobileEnvironment_MobileUserMgmt team member roles in MCS (in addition to the identity domain administrator role in Oracle Cloud) to complete this tutorial. See Assign MCS Team Member Roles in Using Oracle Mobile Cloud Service.
Let's quickly set up a realm, some roles, and a few users.
Create a new user realm
A realm contains a set of users for mobile apps. Each mobile backend can use a single realm (and a realm can be used for multiple mobile backends). We'll create a realm specifically for our app.
- Click and select Applications > Mobile User Management.
- Click Realms.
- Click New Realm.
- Enter
FiFRealm
for the Realm Name and click Create.
Create mobile roles
A role is a set of permissions to access APIs and resources. We’ll create a couple of roles here and later assign those roles to users of our app.
- Click Roles.
- Click New Role,
type
Customer
as the role name, and click Create. - If you have not already created the
Technician
role, click New Role, typeTechnician
as the role name, and click Create.
Create mobile users
- Click Users.
- Make sure that
FiFRealm 1.0
is selected in the Realm dropdown. - Click New User.
- Type
Jim
for the user name and fill in the remaining fields, including an email address where you can retrieve the generated password.The email address is used to establish uniqueness of users across all of the services in Oracle Cloud. Therefore, you must enter a different email address than what you have entered for other users (but one you have access to).
- In the Roles field,
enter
Technician
. - Click Create.
- Optionally, click New User
again and create a new user and assign that user the
Customer
role.Again, if you complete this step, you'll need to use a different email address than you have used for other users.
Associate the realm with your mobile backend
- In the menu on the left, click Mobile Backends. (If you have hidden the menu, click and select Applications > Mobile Backends.)
- Select the FiF_Customer mobile backend (or any other backend to associate with the realm) and click Open.
- Click Users.
- Click Change user realm.
- In the New Realm dropdown, select
FiFRealm
and click Change.
Sign in to the sample app
- In your IDE, run the application.
- In the app running on the simulator or emulator, click Sign In, enter
Jim
as the user name, and enter the password that was sent to the email address you specified for that user.The login should be successful.
- Log out of the application.
- Once again, click Sign In,
but this time enter
Joe
as the user name.The login should fail since this user has not been added to
FiFRealm
.
Change the realm back
Since the other tutorials in this series are based on the same mobile backend, change the realm back to the default so that your team members can complete those tutorials without modifications to the instructions.
- In the menu on the left in MCS, click Mobile Backends. (If you have hidden the menu, click and select Applications > Mobile Backends.)
- Select your mobile backend and click Open.
- Click Users.
- Click Change Realm.
- In the New Realm dropdown, select
Default 1.0
and click Change.
Next steps
- Learn more about mobile user management.