Interface Member
-
- All Implemented Interfaces:
public interface MemberThe Member interface provides methods for retrieving and updating the current authenticated member.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final classMember.UpdateParamsData class used for wrapping parameters used with Member updates
-
Method Summary
Modifier and Type Method Description abstract UnitonChange(Function1<StytchObjectInfo<MemberData>, Unit> callback)Assign a callback that will be called when the member data changes abstract StytchResult<MemberResponseData>get()Wraps Stytch’s organization/members/me endpoint. abstract Unitget(Function1<StytchResult<MemberResponseData>, Unit> callback)Wraps Stytch’s organization/members/me endpoint. abstract CompletableFuture<StytchResult<MemberResponseData>>getCompletable()Wraps Stytch’s organization/members/me endpoint. abstract MemberDatagetSync()Get member from memory without network call abstract StytchResult<UpdateMemberResponseData>update(Member.UpdateParams params)Updates the currently authenticated member abstract Unitupdate(Member.UpdateParams params, Function1<StytchResult<UpdateMemberResponseData>, Unit> callback)Updates the currently authenticated member abstract CompletableFuture<StytchResult<UpdateMemberResponseData>>updateCompletable(Member.UpdateParams params)Updates the currently authenticated member abstract StytchResult<MemberDeleteAuthenticationFactorData>deleteFactor(MemberAuthenticationFactor factor)Deletes a MemberAuthenticationFactor from the currently authenticated member abstract UnitdeleteFactor(MemberAuthenticationFactor factor, Function1<StytchResult<MemberDeleteAuthenticationFactorData>, Unit> callback)Deletes a MemberAuthenticationFactor from the currently authenticated member abstract CompletableFuture<StytchResult<MemberDeleteAuthenticationFactorData>>deleteFactorCompletable(MemberAuthenticationFactor factor)Deletes a MemberAuthenticationFactor from the currently authenticated member abstract StateFlow<StytchObjectInfo<MemberData>>getOnChange()Exposes a flow of member data -
-
Method Detail
-
onChange
abstract Unit onChange(Function1<StytchObjectInfo<MemberData>, Unit> callback)
Assign a callback that will be called when the member data changes
-
get
abstract StytchResult<MemberResponseData> get()
Wraps Stytch’s organization/members/me endpoint.
- Returns:
MemberResponse
-
get
abstract Unit get(Function1<StytchResult<MemberResponseData>, Unit> callback)
Wraps Stytch’s organization/members/me endpoint.
- Parameters:
callback- a callback that receives a MemberResponse
-
getCompletable
abstract CompletableFuture<StytchResult<MemberResponseData>> getCompletable()
Wraps Stytch’s organization/members/me endpoint.
- Returns:
MemberResponse
-
getSync
abstract MemberData getSync()
Get member from memory without network call
- Returns:
locally stored MemberData
-
update
abstract StytchResult<UpdateMemberResponseData> update(Member.UpdateParams params)
Updates the currently authenticated member
- Parameters:
params- required to update the member- Returns:
UpdateMemberResponse
-
update
abstract Unit update(Member.UpdateParams params, Function1<StytchResult<UpdateMemberResponseData>, Unit> callback)
Updates the currently authenticated member
- Parameters:
params- required to update the membercallback- a callback that receives an UpdateMemberResponse
-
updateCompletable
abstract CompletableFuture<StytchResult<UpdateMemberResponseData>> updateCompletable(Member.UpdateParams params)
Updates the currently authenticated member
- Parameters:
params- required to update the member- Returns:
UpdateMemberResponse
-
deleteFactor
abstract StytchResult<MemberDeleteAuthenticationFactorData> deleteFactor(MemberAuthenticationFactor factor)
Deletes a MemberAuthenticationFactor from the currently authenticated member
- Returns:
DeleteMemberAuthenticationFactorResponse
-
deleteFactor
abstract Unit deleteFactor(MemberAuthenticationFactor factor, Function1<StytchResult<MemberDeleteAuthenticationFactorData>, Unit> callback)
Deletes a MemberAuthenticationFactor from the currently authenticated member
- Parameters:
callback- A callback that receives a DeleteMemberAuthenticationFactorResponse
-
deleteFactorCompletable
abstract CompletableFuture<StytchResult<MemberDeleteAuthenticationFactorData>> deleteFactorCompletable(MemberAuthenticationFactor factor)
Deletes a MemberAuthenticationFactor from the currently authenticated member
- Returns:
DeleteMemberAuthenticationFactorResponse
-
getOnChange
abstract StateFlow<StytchObjectInfo<MemberData>> getOnChange()
Exposes a flow of member data
-
-
-
-