Package org.gcube.service.idm.controller
Class AuthController
- java.lang.Object
-
- org.gcube.service.idm.controller.AuthController
-
public class AuthController extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static List<String>ACCESS_ADMIN_REALM_ROLESstatic List<String>ACCESS_ADMIN_ROLESstatic List<String>ACCESS_READ_ROLESstatic StringIDM_SERVICE_ADMINstatic StringIDM_SERVICE_READstatic StringIDM_SERVICE_REALM
-
Constructor Summary
Constructors Constructor Description AuthController()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static booleancheckAnyRole(List<String> roles)static booleancheckContextRole(String context_role)static booleancheckContextRole(String context_role, org.gcube.common.security.Owner owner)static voidcheckIsContextmAdmin(String message)static voidcheckIsRealmAdmin(String message)static booleancheckRealmRole(String realm_role)static booleancheckRealmRole(String realm_role, String access_token)static booleancheckRole(String role)static StringgetAccessToken()static org.gcube.common.security.OwnergetOwner()static booleanuserIsMe(String username)static booleanuserIsMe(String username, org.gcube.common.security.Owner owner)
-
-
-
Field Detail
-
IDM_SERVICE_READ
public static final String IDM_SERVICE_READ
- See Also:
- Constant Field Values
-
IDM_SERVICE_ADMIN
public static final String IDM_SERVICE_ADMIN
- See Also:
- Constant Field Values
-
IDM_SERVICE_REALM
public static final String IDM_SERVICE_REALM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getAccessToken
public static String getAccessToken()
-
getOwner
public static org.gcube.common.security.Owner getOwner()
-
checkRealmRole
public static boolean checkRealmRole(String realm_role)
-
checkContextRole
public static boolean checkContextRole(String context_role)
-
checkContextRole
public static boolean checkContextRole(String context_role, org.gcube.common.security.Owner owner)
-
checkRole
public static boolean checkRole(String role)
-
userIsMe
public static boolean userIsMe(String username)
-
userIsMe
public static boolean userIsMe(String username, org.gcube.common.security.Owner owner)
-
checkIsRealmAdmin
public static void checkIsRealmAdmin(String message) throws jakarta.ws.rs.ForbiddenException
- Throws:
jakarta.ws.rs.ForbiddenException
-
checkIsContextmAdmin
public static void checkIsContextmAdmin(String message) throws jakarta.ws.rs.ForbiddenException
- Throws:
jakarta.ws.rs.ForbiddenException
-
-