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 StringACCOUNT_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.ResponseaccountPage()Get account information.static javax.ws.rs.core.UriBuilderaccountServiceApplicationPage(javax.ws.rs.core.UriInfo uriInfo)static javax.ws.rs.core.UriBuilderaccountServiceBaseUrl(javax.ws.rs.core.UriInfo uriInfo)javax.ws.rs.core.ResponseapplicationsPage()javax.ws.rs.core.ResponsefederatedIdentityPage()protected URIgetBaseRedirectUri()protected Set<String>getValidPaths()javax.ws.rs.core.ResponsegrantPermission(String resourceId, String action, String[] permissionId, String requester)voidinit()static booleanisPasswordSet(KeycloakSession session, RealmModel realm, UserModel user)static javax.ws.rs.core.UriBuilderloginRedirectUrl(javax.ws.rs.core.UriBuilder base)javax.ws.rs.core.ResponselogPage()javax.ws.rs.core.ResponsepasswordPage()static javax.ws.rs.core.UriBuilderpasswordUrl(javax.ws.rs.core.UriBuilder base)javax.ws.rs.core.ResponseprocessAccountUpdate()Update account information.javax.ws.rs.core.ResponseprocessFederatedIdentityUpdate()javax.ws.rs.core.ResponseprocessPasswordUpdate()Update account passwordjavax.ws.rs.core.ResponseprocessResourceActions(String[] resourceIds, String action)javax.ws.rs.core.ResponseprocessRevokeGrant()javax.ws.rs.core.ResponseprocessSessionsLogout()javax.ws.rs.core.ResponseprocessTotpUpdate()Update the TOTP for this account.javax.ws.rs.core.ResponseresourceDetailPage(String resourceId)javax.ws.rs.core.ResponseresourceDetailPageAfterGrant(String resourceId)javax.ws.rs.core.ResponseresourceDetailPageAfterShare(String resourceId)javax.ws.rs.core.ResponseresourcesPage(String resourceId)javax.ws.rs.core.ResponsesessionsPage()javax.ws.rs.core.ResponseshareResource(String resourceId, String[] userIds, String[] scopes)javax.ws.rs.core.ResponsetotpPage()static javax.ws.rs.core.UriBuildertotpUrl(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:
getValidPathsin 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:
getBaseRedirectUriin classAbstractSecuredLocalService
-
isPasswordSet
public static boolean isPasswordSet(KeycloakSession session, RealmModel realm, UserModel user)
-
-