Class AccountFormService
- java.lang.Object
-
- org.keycloak.services.resources.AbstractSecuredLocalService
-
- org.keycloak.services.resources.account.AccountFormService
-
public class AccountFormService extends AbstractSecuredLocalService
- Author:
- Stian Thorgersen
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACCOUNT_MGMT_FORWARDED_ERROR_NOTE
-
Fields inherited from class org.keycloak.services.resources.AbstractSecuredLocalService
auth, client, clientConnection, headers, realm, request, session, stateChecker
-
-
Constructor Summary
Constructors Constructor Description AccountFormService(KeycloakSession session, ClientModel client, EventBuilder event)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description javax.ws.rs.core.Response
accountPage()
Get account information.static javax.ws.rs.core.UriBuilder
accountServiceApplicationPage(javax.ws.rs.core.UriInfo uriInfo)
static javax.ws.rs.core.UriBuilder
accountServiceBaseUrl(javax.ws.rs.core.UriInfo uriInfo)
javax.ws.rs.core.Response
applicationsPage()
javax.ws.rs.core.Response
federatedIdentityPage()
protected URI
getBaseRedirectUri()
protected Set<String>
getValidPaths()
javax.ws.rs.core.Response
grantPermission(String resourceId, String action, String[] permissionId, String requester)
void
init()
static boolean
isPasswordSet(KeycloakSession session, RealmModel realm, UserModel user)
static javax.ws.rs.core.UriBuilder
loginRedirectUrl(javax.ws.rs.core.UriBuilder base)
javax.ws.rs.core.Response
logPage()
javax.ws.rs.core.Response
passwordPage()
static javax.ws.rs.core.UriBuilder
passwordUrl(javax.ws.rs.core.UriBuilder base)
javax.ws.rs.core.Response
processAccountUpdate()
Update account information.javax.ws.rs.core.Response
processFederatedIdentityUpdate()
javax.ws.rs.core.Response
processPasswordUpdate()
Update account passwordjavax.ws.rs.core.Response
processResourceActions(String[] resourceIds, String action)
javax.ws.rs.core.Response
processRevokeGrant()
javax.ws.rs.core.Response
processSessionsLogout()
javax.ws.rs.core.Response
processTotpUpdate()
Update the TOTP for this account.javax.ws.rs.core.Response
resourceDetailPage(String resourceId)
javax.ws.rs.core.Response
resourceDetailPageAfterGrant(String resourceId)
javax.ws.rs.core.Response
resourceDetailPageAfterShare(String resourceId)
javax.ws.rs.core.Response
resourcesPage(String resourceId)
javax.ws.rs.core.Response
sessionsPage()
javax.ws.rs.core.Response
shareResource(String resourceId, String[] userIds, String[] scopes)
javax.ws.rs.core.Response
totpPage()
static javax.ws.rs.core.UriBuilder
totpUrl(javax.ws.rs.core.UriBuilder base)
-
Methods inherited from class org.keycloak.services.resources.AbstractSecuredLocalService
login, loginRedirect
-
-
-
-
Field Detail
-
ACCOUNT_MGMT_FORWARDED_ERROR_NOTE
public static final String ACCOUNT_MGMT_FORWARDED_ERROR_NOTE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AccountFormService
public AccountFormService(KeycloakSession session, ClientModel client, EventBuilder event)
-
-
Method Detail
-
init
public void init()
-
accountServiceBaseUrl
public static javax.ws.rs.core.UriBuilder accountServiceBaseUrl(javax.ws.rs.core.UriInfo uriInfo)
-
accountServiceApplicationPage
public static javax.ws.rs.core.UriBuilder accountServiceApplicationPage(javax.ws.rs.core.UriInfo uriInfo)
-
getValidPaths
protected Set<String> getValidPaths()
- Specified by:
getValidPaths
in classAbstractSecuredLocalService
-
accountPage
@Path("/") @GET @Produces("text/html") public javax.ws.rs.core.Response accountPage()
Get account information.- Returns:
-
totpUrl
public static javax.ws.rs.core.UriBuilder totpUrl(javax.ws.rs.core.UriBuilder base)
-
totpPage
@Path("totp") @GET public javax.ws.rs.core.Response totpPage()
-
passwordUrl
public static javax.ws.rs.core.UriBuilder passwordUrl(javax.ws.rs.core.UriBuilder base)
-
passwordPage
@Path("password") @GET public javax.ws.rs.core.Response passwordPage()
-
federatedIdentityPage
@Path("identity") @GET public javax.ws.rs.core.Response federatedIdentityPage()
-
logPage
@Path("log") @GET public javax.ws.rs.core.Response logPage()
-
sessionsPage
@Path("sessions") @GET public javax.ws.rs.core.Response sessionsPage()
-
applicationsPage
@Path("applications") @GET public javax.ws.rs.core.Response applicationsPage()
-
processAccountUpdate
@Path("/") @POST @Consumes("application/x-www-form-urlencoded") public javax.ws.rs.core.Response processAccountUpdate()
Update account information.Form params:
firstName lastName email
- Returns:
-
processSessionsLogout
@Path("sessions") @POST public javax.ws.rs.core.Response processSessionsLogout()
-
processRevokeGrant
@Path("applications") @POST @Consumes("application/x-www-form-urlencoded") public javax.ws.rs.core.Response processRevokeGrant()
-
processTotpUpdate
@Path("totp") @POST @Consumes("application/x-www-form-urlencoded") public javax.ws.rs.core.Response processTotpUpdate()
Update the TOTP for this account.form parameters:
totp - otp generated by authenticator totpSecret - totp secret to register
- Returns:
-
processPasswordUpdate
@Path("password") @POST @Consumes("application/x-www-form-urlencoded") public javax.ws.rs.core.Response processPasswordUpdate()
Update account passwordForm params:
password - old password password-new pasword-confirm
- Returns:
-
processFederatedIdentityUpdate
@Path("identity") @POST @Consumes("application/x-www-form-urlencoded") public javax.ws.rs.core.Response processFederatedIdentityUpdate()
-
resourcesPage
@Path("resource") @GET public javax.ws.rs.core.Response resourcesPage(@QueryParam("resource_id") String resourceId)
-
resourceDetailPage
@Path("resource/{resource_id}") @GET public javax.ws.rs.core.Response resourceDetailPage(@PathParam("resource_id") String resourceId)
-
resourceDetailPageAfterGrant
@Path("resource/{resource_id}/grant") @GET public javax.ws.rs.core.Response resourceDetailPageAfterGrant(@PathParam("resource_id") String resourceId)
-
grantPermission
@Path("resource/{resource_id}/grant") @POST public javax.ws.rs.core.Response grantPermission(@PathParam("resource_id") String resourceId, @FormParam("action") String action, @FormParam("permission_id") String[] permissionId, @FormParam("requester") String requester)
-
resourceDetailPageAfterShare
@Path("resource/{resource_id}/share") @GET public javax.ws.rs.core.Response resourceDetailPageAfterShare(@PathParam("resource_id") String resourceId)
-
shareResource
@Path("resource/{resource_id}/share") @POST public javax.ws.rs.core.Response shareResource(@PathParam("resource_id") String resourceId, @FormParam("user_id") String[] userIds, @FormParam("scope_id") String[] scopes)
-
processResourceActions
@Path("resource") @POST public javax.ws.rs.core.Response processResourceActions(@FormParam("resource_id") String[] resourceIds, @FormParam("action") String action)
-
loginRedirectUrl
public static javax.ws.rs.core.UriBuilder loginRedirectUrl(javax.ws.rs.core.UriBuilder base)
-
getBaseRedirectUri
protected URI getBaseRedirectUri()
- Specified by:
getBaseRedirectUri
in classAbstractSecuredLocalService
-
isPasswordSet
public static boolean isPasswordSet(KeycloakSession session, RealmModel realm, UserModel user)
-
-