229a53fa0a
changes authentication to no longer use a refresh token & access token for accessing protected endpoints. Instead only an auth token is used. Before the login flow was: Login -> get refresh (stored as HttpOnly cookie) + access token (stored in memory) -> protected endpoint request (attach access token as Authorization header) -> access token expires in 15 minutes, so use refresh token to obtain new one when that happens now it looks like this: Login -> get auth token (stored as HttpOnly cookie) -> make protected endpont request (token sent) the reasoning for using the refresh + access token was to reduce DB calls, but in the end I don't think its worth the hassle.
96 lines
1.9 KiB
GraphQL
96 lines
1.9 KiB
GraphQL
extend type Mutation {
|
|
createUserAccount(input: NewUserAccount!):
|
|
UserAccount! @hasRole(roles: [ADMIN], level: ORG, type: ORG)
|
|
deleteUserAccount(input: DeleteUserAccount!):
|
|
DeleteUserAccountPayload! @hasRole(roles: [ADMIN], level: ORG, type: ORG)
|
|
deleteInvitedUserAccount(input: DeleteInvitedUserAccount!):
|
|
DeleteInvitedUserAccountPayload! @hasRole(roles: [ADMIN], level: ORG, type: ORG)
|
|
|
|
logoutUser(input: LogoutUser!): Boolean!
|
|
clearProfileAvatar: UserAccount!
|
|
|
|
updateUserPassword(input: UpdateUserPassword!): UpdateUserPasswordPayload!
|
|
updateUserRole(input: UpdateUserRole!):
|
|
UpdateUserRolePayload! @hasRole(roles: [ADMIN], level: ORG, type: ORG)
|
|
updateUserInfo(input: UpdateUserInfo!):
|
|
UpdateUserInfoPayload! @hasRole(roles: [ADMIN], level: ORG, type: ORG)
|
|
}
|
|
|
|
extend type Query {
|
|
searchMembers(input: MemberSearchFilter!): [MemberSearchResult!]!
|
|
}
|
|
|
|
input DeleteInvitedUserAccount {
|
|
invitedUserID: UUID!
|
|
}
|
|
|
|
type DeleteInvitedUserAccountPayload {
|
|
invitedUser: InvitedUserAccount!
|
|
}
|
|
|
|
input MemberSearchFilter {
|
|
searchFilter: String!
|
|
projectID: UUID
|
|
}
|
|
|
|
|
|
type MemberSearchResult {
|
|
similarity: Int!
|
|
id: String!
|
|
user: UserAccount
|
|
status: ShareStatus!
|
|
}
|
|
|
|
type UpdateUserInfoPayload {
|
|
user: UserAccount!
|
|
}
|
|
|
|
input UpdateUserInfo {
|
|
name: String!
|
|
initials: String!
|
|
email: String!
|
|
bio: String!
|
|
}
|
|
|
|
input UpdateUserPassword {
|
|
userID: UUID!
|
|
password: String!
|
|
}
|
|
|
|
type UpdateUserPasswordPayload {
|
|
ok: Boolean!
|
|
user: UserAccount!
|
|
}
|
|
|
|
input UpdateUserRole {
|
|
userID: UUID!
|
|
roleCode: RoleCode!
|
|
}
|
|
|
|
type UpdateUserRolePayload {
|
|
user: UserAccount!
|
|
}
|
|
|
|
input NewUserAccount {
|
|
username: String!
|
|
email: String!
|
|
fullName: String!
|
|
initials: String!
|
|
password: String!
|
|
roleCode: String!
|
|
}
|
|
|
|
input LogoutUser {
|
|
userID: UUID!
|
|
}
|
|
|
|
input DeleteUserAccount {
|
|
userID: UUID!
|
|
newOwnerID: UUID
|
|
}
|
|
|
|
type DeleteUserAccountPayload {
|
|
ok: Boolean!
|
|
userAccount: UserAccount!
|
|
}
|