Skip to content

Commit 16ffee2

Browse files
feat: add internal login operation with request and response models
1 parent 97a0113 commit 16ffee2

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

src/auth/models.tsp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,14 @@ namespace CoreSystem.Auth {
1919
@doc("The new refresh token.")
2020
refreshToken: string;
2121
}
22+
23+
model InternalLoginRequest {
24+
@doc("The user ID to login as.")
25+
uid: string;
26+
}
27+
28+
model InternalLoginResponse {
29+
@doc("Login status message.")
30+
message: string;
31+
}
2232
}

src/auth/operations.tsp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,16 @@ namespace CoreSystem.Auth {
4545
} | {
4646
@statusCode statusCode: 401;
4747
};
48+
49+
@summary("Internal Login (Debug)")
50+
@route("/auth/login/internal")
51+
@post
52+
op internalLogin(
53+
@doc("Login request with user ID.")
54+
@body
55+
request: InternalLoginRequest,
56+
): {
57+
@statusCode statusCode: 200;
58+
@body response: InternalLoginResponse;
59+
};
4860
}

0 commit comments

Comments
 (0)