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.
id
the id of the usercred
the new credentials
Send an email-verification email to the user An email contains a link the user can click to verify their email address.
id
the id of the userclient_id
optional client idredirect_uri
optional 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
search
is specified other criteria such aslastname
will be ignored even though you set them. Thesearch
string will be matched against the first and lastname, the username and the email of a user - If
search
is unspecified but any oflastname
,firstname
,email
orusername
those criteria are matched against their respective fields on a user entity. Combined with a logical and.
Params:
email
A String contained in email, or the complete email, if param "exact" is trueemail_verified
whether the email has been verifiedenabled
Boolean representing if user is enabled or notfirstname
A String contained in firstName, or the complete firstName, if param "exact" is truelastname
A String contained in lastName, or the complete lastName, if param "exact" is truesearch
A String contained in username, first or last name, or emailusername
A String contained in username, or the complete username, if param "exact" is true
Get groups of the given user identified by id
brief
Boolean which defines whether brief representations are returnedfirst
Pagination offsetmax
Maximum results size (defaults to 100)search
A String contained in username, first or last name, or email
Get sessions associated with the user
id
the id of the user
Get users returns a stream of users, filtered according to query parameters.
brief
Boolean which defines whether brief representations are returnedemail
A String contained in email, or the complete email, if param "exact" is trueemail_verified
whether the email has been verifiedenabled
Boolean representing if user is enabled or notexact
Boolean which defines whether the params "last", "first", "email" and "username" must match exactlyfirst
Pagination offsetfirstname
A String contained in firstName, or the complete firstName, if param "exact" is trueidp_alias
The alias of an Identity Provider linked to the useridp_user_id
The userId at an Identity Provider linked to the userlastname
A String contained in lastName, or the complete lastName, if param "exact" is truemax
Maximum results size (defaults to 100)q
A query to search for custom attributes, in the format 'key1:value2 key2:value2'search
A String contained in username, first or last name, or emailusername
A String contained in username, or the complete username, if param "exact" is true