Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dev -> main #176

Merged
merged 2 commits into from
May 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
public class SignallingController {

@MessageMapping("/peer/offer/{camKey}/{roomShortUuid}")
@SendTo("/topic/peer/offer/{camKey}/{roomShortUuid}")
@SendTo("/subscription/peer/offer/{camKey}/{roomShortUuid}")
public String peerHandleOffer(
@Payload String offer,
@Header("Authorization") String authorization,
Expand All @@ -29,7 +29,7 @@ public String peerHandleOffer(
//iceCandidate ์ •๋ณด๋ฅผ ์ฃผ๊ณ  ๋ฐ›๊ธฐ ์œ„ํ•œ webSocket
//camKey : ๊ฐ ์š”์ฒญํ•˜๋Š” ์บ ์˜ key , roomShortUuid : ๋ฃธ ์•„์ด๋””
@MessageMapping("/peer/iceCandidate/{camKey}/{roomShortUuid}")
@SendTo("/topic/peer/iceCandidate/{camKey}/{roomShortUuid}")
@SendTo("/subscription/peer/iceCandidate/{camKey}/{roomShortUuid}")
public String peerHandleIceCandidate(
@Payload String candidate,
@Header("Authorization") String authorization,
Expand All @@ -42,7 +42,7 @@ public String peerHandleIceCandidate(

//
@MessageMapping("/peer/answer/{camKey}/{roomShortUuid}")
@SendTo("/topic/peer/answer/{camKey}/{roomShortUuid}")
@SendTo("/subscription/peer/answer/{camKey}/{roomShortUuid}")
public String peerHandleAnswer(
@Payload String answer,
@Header("Authorization") String authorization,
Expand All @@ -55,7 +55,7 @@ public String peerHandleAnswer(

//camKey ๋ฅผ ๋ฐ›๊ธฐ์œ„ํ•ด ์‹ ํ˜ธ๋ฅผ ๋ณด๋‚ด๋Š” webSocket
@MessageMapping("/call/key")
@SendTo("/topic/call/key")
@SendTo("/subscription/call/key")
public String callKey(
@Payload String message,
@Header("Authorization") String authorization
Expand All @@ -66,7 +66,7 @@ public String callKey(

//์ž์‹ ์˜ camKey ๋ฅผ ๋ชจ๋“  ์—ฐ๊ฒฐ๋œ ์„ธ์…˜์— ๋ณด๋‚ด๋Š” webSocket
@MessageMapping("/send/key")
@SendTo("/topic/send/key")
@SendTo("/subscription/send/key")
public String sendKey(
@Payload String message,
@Header("Authorization") String authorization
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ public Message<?> preSend(Message<?> message, MessageChannel channel) {
}

private String extractToken(StompHeaderAccessor accessor) {
// String authorization = accessor.getFirstNativeHeader(AUTHORIZATION_HEADER);
String authorization = "Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0bmd1c0BuYXZlci5jb20iLCJyb2xlcyI6WyJST0xFX1VTRVIiXSwiaWF0IjoxNzEzNzU4ODUxLCJleHAiOjE3MTYzNTA4NTF9.5B7899g1Q6A99EeZVRRUHWTeZaaQ8L2SSEOqTtomeFI";
String authorization = accessor.getFirstNativeHeader(AUTHORIZATION_HEADER);
if (authorization == null) {
log.warn("ํ† ํฐ์ด null ์ž…๋‹ˆ๋‹ค.");
throw new IllegalArgumentException("token is null");
Expand Down
Loading