@Requirement(reqId="DOI_AUTH_010", reqName="Authentification par login/mot de passe") public final class RoleAuthorizer extends Object
Modifier and Type | Class and Description |
---|---|
private static class |
RoleAuthorizer.RoleAuthorizerHolder
Class to handle the instance
|
Modifier and Type | Field and Description |
---|---|
static String |
GROUP_ADMIN
Group name for the administrators "Administrator".
|
static String |
GROUP_USERS
Group name for the users "Users".
|
private static org.apache.logging.log4j.Logger |
LOG
Logger.
|
private static MyMemoryRealm |
REALM
Realm.
|
static String |
ROLE_ADMIN
Role name for the administrators "admin".
|
Modifier | Constructor and Description |
---|---|
private |
RoleAuthorizer()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
boolean |
createRealmFor(org.restlet.Application app)
Init Realm for an application.
|
private org.restlet.security.Group |
findGroupByName(String name)
Finds a group by its name
|
static RoleAuthorizer |
getInstance()
Access to unique INSTANCE of role authorizer
|
private void |
initForAdmin(org.restlet.Application app)
Sets Realm for admin application.
|
private void |
initForMds(org.restlet.Application app)
Sets Realm to Mds application.
|
private void |
initUsersGroups()
Init users and groups in REALM.
|
org.restlet.Application |
loadApplicationBy(String appName)
Loads the application
|
public static final String ROLE_ADMIN
public static final String GROUP_USERS
public static final String GROUP_ADMIN
private static final org.apache.logging.log4j.Logger LOG
private static final MyMemoryRealm REALM
public static RoleAuthorizer getInstance()
private void initUsersGroups()
private void initForMds(org.restlet.Application app)
app
- Mds applicationprivate org.restlet.security.Group findGroupByName(String name)
name
- group nameprivate void initForAdmin(org.restlet.Application app)
app
- Admin applicationpublic boolean createRealmFor(org.restlet.Application app)
app
- applicationpublic org.restlet.Application loadApplicationBy(String appName)
appName
- application nameCopyright © 2017–2020 CNES. All rights reserved.