module Keycloak::UserClient
Direct including types
Defined in:
keycloak/client/user.crInstance Method Summary
- #create_user(user : Representation::User)
- #delete_user(id : String)
- #get_user(id : String, klass = Representation::User)
- #get_user_credentials(id : String) : Array(Representation::Credential)
-
#reset_password(id : String, cred : Representation::Credential)
Set up a new password for the user.
-
#send_verify_email(id : String, *, client_id : String | Nil = nil, redirect_uri : String | Nil = nil)
Send an email-verification email to the user An email contains a link the user can click to verify their email address.
- #update_user(user : Representation::User)
-
#user_count(*, email : String | Nil = nil, email_verified : Bool | Nil = nil, enabled : Bool | Nil = nil, firstname : String | Nil = nil, lastname : String | Nil = nil, search : String | Nil = nil, username : String | Nil = nil) : Int32
Returns the number of users that match the given criteria.
-
#user_groups(id : String, *, brief : Bool | Nil = nil, first : Int32 | Nil = nil, max : Int32 | Nil = nil, search : String | Nil = nil) : Array(Representation::Group)
Get groups of the given user identified by
id -
#user_sessions(id : String) : Representation::UserSession
Get sessions associated with the user
-
#users(*, brief : Bool | Nil = nil, email : String | Nil = nil, email_verified : Bool | Nil = nil, enabled : Bool | Nil = nil, exact : Bool | Nil = nil, first : Int32 | Nil = nil, firstname : String | Nil = nil, idp_alias : String | Nil = nil, idp_user_id : String | Nil = nil, lastname : String | Nil = nil, max : Int32 | Nil = nil, q : String | Nil = nil, search : String | Nil = nil, username : String | Nil = nil, klass = Array(Representation::User))
Get users returns a stream of users, filtered according to query parameters.
Instance Method Detail
Set up a new password for the user.
idthe id of the usercredthe new credentials
Send an email-verification email to the user An email contains a link the user can click to verify their email address.
idthe id of the userclient_idoptional client idredirect_urioptional redirect uri
Returns the number of users that match the given criteria. It can be called in three different ways:
- Don’t specify any criteria and pass. The number of all users within that realm will be returned.
- If
searchis specified other criteria such aslastnamewill be ignored even though you set them. Thesearchstring will be matched against the first and lastname, the username and the email of a user - If
searchis unspecified but any oflastname,firstname,emailorusernamethose criteria are matched against their respective fields on a user entity. Combined with a logical and.
Params:
emailA String contained in email, or the complete email, if param "exact" is trueemail_verifiedwhether the email has been verifiedenabledBoolean representing if user is enabled or notfirstnameA String contained in firstName, or the complete firstName, if param "exact" is truelastnameA String contained in lastName, or the complete lastName, if param "exact" is truesearchA String contained in username, first or last name, or emailusernameA String contained in username, or the complete username, if param "exact" is true
Get groups of the given user identified by id
briefBoolean which defines whether brief representations are returnedfirstPagination offsetmaxMaximum results size (defaults to 100)searchA String contained in username, first or last name, or email
Get sessions associated with the user
idthe id of the user
Get users returns a stream of users, filtered according to query parameters.
briefBoolean which defines whether brief representations are returnedemailA String contained in email, or the complete email, if param "exact" is trueemail_verifiedwhether the email has been verifiedenabledBoolean representing if user is enabled or notexactBoolean which defines whether the params "last", "first", "email" and "username" must match exactlyfirstPagination offsetfirstnameA String contained in firstName, or the complete firstName, if param "exact" is trueidp_aliasThe alias of an Identity Provider linked to the useridp_user_idThe userId at an Identity Provider linked to the userlastnameA String contained in lastName, or the complete lastName, if param "exact" is truemaxMaximum results size (defaults to 100)qA query to search for custom attributes, in the format 'key1:value2 key2:value2'searchA String contained in username, first or last name, or emailusernameA String contained in username, or the complete username, if param "exact" is true