Package org.jwcarman.who.admin


package org.jwcarman.who.admin
  • Class
    Description
    The checks every admin endpoint makes before it looks at anything the request names, in this order: signed out is 401; a request whose permissions lack the one needed is 403; then, for a request that changes something, the caller decides: a browser session whose sign-in is no longer recent is 401 and must sign in again; a session cookie with an API key or bearer token beside it, which the session signed in and the header did not, is 403, as is any sign-in that is neither a browser session nor a bearer token or an API key.
    The answer to POST /who/invitations.
    The addresses of who's email sign-in.
    who's identity admin endpoints: GET /identities?status=&role=&email=&page=0&size=20 pages through identities, oldest first, as an IdentityPage.
    The email addresses identities sign in with, as the admin endpoints read them. who's autoconfiguration supplies one, an EmailLinkIdentityEmails, when email sign-in is on; without it the endpoints show no addresses and refuse a search by address.
    A request named an identity that does not exist, or an id that is not a UUID.
    A request to change an identity that holds a permission the caller does not: deactivating or reactivating it, or assigning or removing one of its roles. who's admin endpoints change only identities whose every permission, as who resolves them whatever their status, the caller holds too; for an API key, those its scopes keep.
    One page of identities, as GET /who/identities answers it.
    An identity as who's admin endpoints show it.
    A request to an admin endpoint that who refuses as it stands: a page or size out of range, a status who does not know, a body that is not the expected JSON, or a search by email address without email sign-in.
    POST /invitations with {"email": "...", "roles": ["..."]} invites the address through InvitationService.invite(String, Set) and answers 201 with a CreatedInvitation; roles may be left out for none.
    A change that would leave no active identity holding WhoAdminPermissions.IDENTITIES_MANAGE: deactivating the last one, or removing the role through which the last one holds it.
    Keeps who's admin endpoints from leaving no active identity that holds WhoAdminPermissions.IDENTITIES_MANAGE.
    A signed-in request to an admin endpoint whose permissions lack the one it needs, such as WhoAdminPermissions.IDENTITIES_READ.
    A request to grant a role that carries a permission the caller does not hold itself. who's admin endpoints grant only roles within the caller's own permissions; for an API key, those its scopes keep.
    GET /who/roles lists every role with its permissions, by name.
    A role as GET /who/roles shows it.
    A request to deactivate the identity making it: an admin cannot lock themselves out.
    A request named a role that does not exist. who's admin endpoints assign and remove only roles the application has made.
    The permissions who's admin endpoints check. who defines them but grants them to no one: an application assigns them to its own roles, as it would any permission, for example with RbacService.addPermissionToRole(role, WhoAdminPermissions.IDENTITIES_READ).