code stringlengths 41 34.3k | lang stringclasses 8
values | review stringlengths 1 4.74k |
|---|---|---|
@@ -1,4 +1,4 @@
-import { EstimationInputDTO, Estimation } from '#estimations/estimation.types.js';
+import { EstimationInputDTO, Estimation, IsActivate } from '#estimations/estimation.types.js';
import { IEstimationRepository } from '#estimations/interfaces/estimation.repository.interface.js';
import { PrismaService... | TypeScript | ์๋ง๋ javascript ๋ ๋ฒจ์ด ์๋๋ผ prisma์์ findMany ํด์ค๋ ๋จ๊ณ์์ ์ด ์์
์ ํด์ ๊ฐ์ ธ์ฌ ์ ์์ ๊ฒ ๊ฐ์ต๋๋ค. ๋์ค์ ํ ๋ฒ ์ฐพ์๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ๋ค์. |
@@ -1,4 +1,4 @@
-import { EstimationInputDTO, Estimation } from '#estimations/estimation.types.js';
+import { EstimationInputDTO, Estimation, IsActivate } from '#estimations/estimation.types.js';
import { IEstimationRepository } from '#estimations/interfaces/estimation.repository.interface.js';
import { PrismaService... | TypeScript | ๋ค!! ์ฐพ์๋ณด๊ฒ ์ต๋๋ค !! ํ์๋ ์๋ ค์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค!!!! |
@@ -3,8 +3,10 @@ import { ParsedUrlQuery } from "querystring";
import { GetServerSideProps } from "next";
import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
+import { getReviewStat, getReviews } from "@/lib/api/ReviewService";
import { getTrainerInfo } from "@/lib/api/trainerService... | Unknown | ```js
useQuery(["review-stat", trainerId],
() => getReviewStat(trainerId as string),
{ enabled: !!trainerId,
cacheTime: 5 * 60 * 1000,
staleTime: 5 * 60 * 1000 });
```
๋ก ํด์ฃผ์๋๊ฒ ์ข์๋ณด์ฌ์. |
@@ -3,8 +3,10 @@ import { ParsedUrlQuery } from "querystring";
import { GetServerSideProps } from "next";
import { useState } from "react";
import { useQuery } from "@tanstack/react-query";
+import { getReviewStat, getReviews } from "@/lib/api/ReviewService";
import { getTrainerInfo } from "@/lib/api/trainerService... | Unknown | ๋ต ์์ ํ๊ฒ ์ต๋๋ค! |
@@ -15,7 +15,7 @@ const CenterWrapper = styled.div`
overflow: scroll;
height: calc(100dvh - 126px);
align-items: center;
- justigy-content: space-between;
+ justify-content: space-between;
padding-top: 80px;
&::-webkit-scrollbar {
display: none;
@@ -155,47 +155,52 @@ const ReviewPage = () => {
... | Unknown | `handleSubmit`์ ์๋ ๋ฆฌ๋ทฐ ๋ฑ๋ก api ๋ก์ง๋ `review.ts`ํ์ผ์ ๋ถ๋ฆฌํ๋ฉด ๊ฐ๋
์ฑ์ด ๋ ์ข์ ๊ฒ ๊ฐ์์! |
@@ -15,7 +15,7 @@ const CenterWrapper = styled.div`
overflow: scroll;
height: calc(100dvh - 126px);
align-items: center;
- justigy-content: space-between;
+ justify-content: space-between;
padding-top: 80px;
&::-webkit-scrollbar {
display: none;
@@ -155,47 +155,52 @@ const ReviewPage = () => {
... | Unknown | ๊ทธ๋ฆฌ๊ณ ์ฑ๊ณต ์ ํ์ด์ง ์ด๋ ์ฝ๋๊ฐ ๋๋ฝ๋ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -37,14 +37,14 @@ export const showReviewRating = async (
// ์ฐ์ฑ
๋ก ๋ฆฌ๋ทฐ ๋ด์ฉ๋ณด๊ธฐ api
export const showReviewContent = async (
walkwayId: string,
- type: string
+ sort: string
): Promise<{
reviews: ReviewContentType[];
}> => {
try {
const response = await instance.get<
ApiResponseFormat<{ reviews: R... | TypeScript | `showReviewContent` ํธ์ถ ์ ์๋ต์ผ๋ก ๋ฐ์์ค๋ `period` ํ๋๊ฐ ui ์ปดํฌ๋ํธ์ ๋๋ฝ๋ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | CSS ์์ฑ ์์๋๋ก ๋ณ๊ฒฝํ๋ฉด ๋ ์ข์๊ฒ ๊ฐ์์
margin, padding ๋ค์ font-size ์์ด๋ค์ ;) |
@@ -0,0 +1,32 @@
+import React from "react";
+import "./Footer.scss";
+
+class Footer extends React.Component {
+ render() {
+ return (
+ <footer>
+ <ul>
+ {RIGHT_FOOTER.map((element, index) => {
+ return <li key={index}>{element}</li>;
+ })}
+ </ul>
+ <p class... | JavaScript | footer ๋ด์ฉ ์ ๋ง๋์
จ๋ค์ bb |
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | ๋ต ์์ ํ๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | this.state ๋ ๊ตฌ์กฐ๋ถํดํ ๋น์ ์ฌ์ฉํด์ ์ ๋ฆฌํด์ฃผ์๋ฉด ๋ ๊น๋ํ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | ์ ๋ถ๋ถ ๋
ธ์
์์ ๋ดค๋๋ฐ handleId๋ handlePw๊ฐ์ด ๋๊ฐ์ ํ์์ event handler๋ผ์ ํฉ์น ์ ์๋๋ผ๊ตฌ์! ์ ๋ ์์ง์ํ์ง๋ง...^^ ๊ฐ์ด ํด๋ณด์์ ใ
ใ
ใ
|
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | ์์ฃผ์ฐ๋ border variable ์๋ค๊ฐ ์ ์ฅํด๋๊ณ ์ฐ๋๊น ํธํ๊ณ ์ข๋๋ผ๊ตฌ์! |
@@ -0,0 +1,21 @@
+import React from "react";
+import "./MainRight.scss";
+import RecommendHeader from "./MainRight/RecommendHeader";
+import RecommendTitle from "./MainRight/RecommendTitle";
+import RecommendFriends from "./MainRight/RecommendFriends";
+import Footer from "./MainRight/Footer";
+
+class MainRight extend... | JavaScript | ์ค ๋ฒ์จ ๋ค ๋๋์
จ๋ค๋ ๐ |
@@ -0,0 +1,21 @@
+import React from "react";
+import "./MainRight.scss";
+import RecommendHeader from "./MainRight/RecommendHeader";
+import RecommendTitle from "./MainRight/RecommendTitle";
+import RecommendFriends from "./MainRight/RecommendFriends";
+import Footer from "./MainRight/Footer";
+
+class MainRight extend... | JavaScript | ๊น๋....๐คญ |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | ์ค์ท ํ๋ฒ ์๋ํด๋ด์ผ๊ฒ ์ด์! |
@@ -0,0 +1,21 @@
+import React from "react";
+import "./MainRight.scss";
+import RecommendHeader from "./MainRight/RecommendHeader";
+import RecommendTitle from "./MainRight/RecommendTitle";
+import RecommendFriends from "./MainRight/RecommendFriends";
+import Footer from "./MainRight/Footer";
+
+class MainRight extend... | JavaScript | ๊ฐ์ฌํฉ๋๋ฏ๐คญ |
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | ๊ณตํต scss๋ฅผ ์ ํ์ฉํด๋ด์ผ๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,18 @@
+.recommend-title {
+ width:100%;
+ height:40px;
+ margin-bottom:5px;
+
+ .recommend-title-left {
+ float:left;
+ font-size:14px;
+ color:#888;
+ font-weight:700;
+ }
+
+ .recommend-title-right {
+ float:right;
+ font-size:12px;
+ font-... | Unknown | ์ ๋ชฉ ๊น๋ํ๊ณ ์์๋ฃ๊ธฐ ์ฌ์์ ์ข์๊ฑฐ๊ฐ์์! |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | import { Link, withRouter } from "react-router-dom"; ํ์ค๋ก ๋ง๋ค์ด๋ ์ข์๊ฑฐ๊ฐ์์! |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | ๋ต! ๋ฆฌํฉํ ๋ง ํด๋ณด๊ฒ ์ต๋๋ค๐ |
@@ -0,0 +1,63 @@
+import React from "react";
+import Story from "./Mainleft/Story";
+import Feed from "./Mainleft/Feed";
+import "./MainLeft.scss";
+// import { FaRedditAlien } from "react-icons/fa";
+
+class MainLeft extends React.Component {
+ state = {
+ feedList: [],
+ };
+
+ componentDidMount() {
+ fetch(... | JavaScript | ํ๊ทธ๋ช
์ด ํ๋์ ๋ค์ด์์๐ |
@@ -0,0 +1,50 @@
+@import "../../common.scss";
+
+.recommend-header {
+ width:100%;
+ height:100px;
+ @extend %flexbetween;
+ margin-top:5px;
+
+ li {
+ position:relative;
+ &:first-child {
+ &:after {
+ width:64px;
+ height:64px;
+ bo... | Unknown | tirm ํจ์? ์ด์ฉํด์ ๋น์นธ enter๋ฐฉ์งํ๋ ๋ฐฉ๋ฒ์ด์๋๋ผ๊ตฌ์ ๊ฐ์ด ์ฌ์ฉํด๋ด์๐ |
@@ -0,0 +1,181 @@
+import React from "react";
+import Comments from "./Comments";
+import COMMENT from "./CommentData";
+import "./Feed.scss";
+import { FaEllipsisH } from "react-icons/fa";
+import { FaRegHeart } from "react-icons/fa";
+import { FaRegComment } from "react-icons/fa";
+import { FaRegShareSquare } from "r... | JavaScript | ๋์์ ์ด๋ฒคํธ๊ฐ ์คํ๋ ์์๊ฒ ์ ๋ ์ฐ์ฐ์๋ก ์ฌ์ฉํด๋ด์ผ๊ฒ ์ด์!! |
@@ -0,0 +1,88 @@
+@import "../../../../styles/common.scss";
+
+
+%flexbetween {
+ display: flex;
+ align-items: center;
+ justify-content: space-between;
+}
+
+nav {
+ width:100%;
+ height:55px;
+ background-color:#fff;
+ border-bottom :1px solid #ddd;
+ position:fixed;
+ top:0;
+ z-index:10;
+
+ ... | Unknown | placeholder ์คํ์ผ ๊ฐ์ฃผ๋ ๋ฒ ์ ๋ ์จ๋ด์ผ๊ฒ ์ด์! |
@@ -0,0 +1,46 @@
+footer {
+ width:100%;
+ height:70px;
+
+ ul {
+ width:90%;
+ margin-top:20px;
+
+ li {
+ font-size:12px;
+ color:#888;
+ margin-bottom:10px;
+ position:relative;
+ padding-left:5px;
+ padding-right:10px;
+... | Unknown | css์ ํ์์ ๊ฐ์์์์ ํ์๋ฅผ ์ ์ด์ฉํ์
จ๋ค์..! ์ ํํ ์ด์ฉ๋ฒ์ ๋ชฐ๋๋๋ฐ ๋ฐฐ์๊ฐ๋๋ค ๐ฅ๐๐ป |
@@ -0,0 +1,50 @@
+@import "../../common.scss";
+
+.recommend-header {
+ width:100%;
+ height:100px;
+ @extend %flexbetween;
+ margin-top:5px;
+
+ li {
+ position:relative;
+ &:first-child {
+ &:after {
+ width:64px;
+ height:64px;
+ bo... | Unknown | afterํ์ฉ ๐๐ป |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | ํ๋์ ํจ์๋ก ํฉ์ณ์ฃผ์ค์ ์๊ฒ ๋ค์-! ๐ |
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | ํ์ค margin ์์ฑ์ผ๋ก ์ค์ฌ๋ณผ ์ ์๊ฒ ๋ค์-! ๐ |
@@ -0,0 +1,98 @@
+import { Component } from "react";
+import { Link, withRouter } from "react-router-dom";
+import "./Login.scss";
+
+class Login extends Component {
+ constructor() {
+ super();
+ this.state = {
+ id: "",
+ pw: "",
+ };
+ }
+
+ // localStorage.clear();
+ // localStorage.removeIte... | JavaScript | ๋ฐ๋ก ํจ์๋ฅผ ๋ง๋ค์ด์ฃผ์์ง ์์๋ ๋ ๊ฒ ๊ฐ์ต๋๋ค-!
```js
const { id, pw } = this.state;
<button className={id.includes('@') && pw.length >= 5 ? 'on' : 'off'} onClick={this.goToMain}>
``` |
@@ -0,0 +1,79 @@
+@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');
+
+* {
+ box-sizing: border-box;
+}
+body{
+ background-color:#fafafa;
+}
+
+.login-wrap{
+ width:30%;
+ height:550px;
+ background-color:#fff;
+ border:3px solid rgba(221, 221, 221, 0.3);
+ margin:130px... | Unknown | ์์ฃผ ์ฌ์ฉ๋๋ ์คํ์ผ ๊ฐ์๋ฐ, scss ๋ณ์๋ก ์ ์ธํด์ ์ฌ์ฉํด์ฃผ์๋ฉด ์ข์ ๋ฏ ํ๋ค์-! ๐ |
@@ -0,0 +1,63 @@
+import React from "react";
+import Story from "./Mainleft/Story";
+import Feed from "./Mainleft/Feed";
+import "./MainLeft.scss";
+// import { FaRedditAlien } from "react-icons/fa";
+
+class MainLeft extends React.Component {
+ state = {
+ feedList: [],
+ };
+
+ componentDidMount() {
+ fetch(... | JavaScript | import ์์ ์์ ํด์ฃผ์ธ์ ๐ ์ผ๋ฐ์ ์ธ convention์ ๋ฐ๋ฅด๋ ์ด์ ๋ ์์ง๋ง ์์๋ง ์ ์ง์ผ์ฃผ์
๋ ๊ฐ๋
์ฑ์ด ์ข์์ง๋๋ค. ์๋ ์์ ์ฐธ๊ณ ํด์ฃผ์ธ์.
- React โ Library(Package) โ Component โ ๋ณ์ / ์ด๋ฏธ์ง โ css ํ์ผ(scss ํ์ผ) |
@@ -0,0 +1,63 @@
+import React from "react";
+import Story from "./Mainleft/Story";
+import Feed from "./Mainleft/Feed";
+import "./MainLeft.scss";
+// import { FaRedditAlien } from "react-icons/fa";
+
+class MainLeft extends React.Component {
+ state = {
+ feedList: [],
+ };
+
+ componentDidMount() {
+ fetch(... | JavaScript | 1. ๋ก์ปฌ ํธ์คํธ์ ๊ฒฝ์ฐ ๋ฐ๋ก ์
๋ ฅ์ ํด์ฃผ์ง ์์ผ์
๋ ์๋์ผ๋ก ๋ค์ด๊ฐ๊ฒ ๋ฉ๋๋ค. ์ด๋ ๊ฒ ์๋ตํด์ ์์ฑ์ ํด์ฃผ์๋ ๊ฒ ๋ ์ข์ต๋๋ค. ์๋ํ๋ฉด, ํฌํธ ๋ฒํธ๊ฐ ๋ณ๊ฒฝ๋๋ ๋๊ฐ ์๊ฐ๋ณด๋ค ๋ง์๋ฐ, ์ด๋ ๊ฒ ์ง์ ์์ฑ์ ํด์ฃผ์ ๊ฒฝ์ฐ ํฌํธ ๋ฒํธ๋ฅผ ์ผ์ผ์ด ์์ ํด์ฃผ์์ผ ํฉ๋๋ค. ์๋ต์ ํด์ ์๋์ ๊ฐ์ด ์์ฑํ ๊ฒฝ์ฐ, ์๋์ผ๋ก ๋ณ๊ฒฝ๋ ํฌํธ๋ฒํธ๊ฐ ๋ค์ด๊ฐ๋๋ค ๐
```js
fetch(`/data/Story.json`)
.then(res => res.json())
.then( ... )
```
2. fetch ์ ๊ธฐ๋ณธ ๋ฉ์๋๋ GET ์
๋๋ค. ๋ฐ๋ผ์ { method: 'GET' }... |
@@ -0,0 +1,65 @@
+import History from "@models/History";
+import {
+ getHistoryItemTemplate,
+ NO_HISTORY_TEMPLATE,
+} from "@templates/history";
+
+export default class HistoryController {
+ constructor(historyContainer) {
+ this.historyContainer = historyContainer;
+ this.numberOfHistory = 0;
+ this._init... | JavaScript | ๐ ๐ ๋ฆฌ๋ทฐ๋๋ฆฐ ๋ถ๋ถ ๋ฐ์ํด์ฃผ์
จ๋ค์~! ํ์คํ ํ
ํ๋ฆฟ์ ์์๋ก ๋ถ๋ฆฌํ๋๊น ๊ฐ๋
์ฑ์ด ์ข์์ก๋ค์ :) |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | `models/User.js` ์์ ์ฌ์ฉ๋๋ ์ด๋ฏธ์ง์๋ alt๊ฐ ํ๊ธ๋ก ๋์ด์๋๋ฐ ์ด๋ถ๋ถ์ ์์ด๋ก ๋์ด์๋ค์! ํต์ผ์์ผ์ฃผ๋ ๊ฒ๋ ์ข์ ๊ฒ ๊ฐ์์~ |
@@ -1,83 +1,112 @@
import GithubApiController from "@controllers/githubController";
import User from "@models/User";
+import {
+ NO_SEARCH_RESULT_TEMPLATE,
+ SEARCH_LOADING_TEMPLATE,
+ getReposTemplate,
+ NO_REPOS_TEMPLATE,
+} from "@templates/search";
+import { SPINNER_TEMPLATE } from "@templates/spinner";
+impo... | JavaScript | ๊ฐ์ธ์ ์ธ ์๊ฐ์ผ๋ก ํจ์๋ช
์ด `getXXXEl`๋ก ๋์ด์์ด์ ๊ธฐ์กด์ ์กด์ฌํ๋ ์๋ ๋จผํธ๋ฅผ ์ฟผ๋ฆฌ์
๋ ํธ๋ก ๊ฐ์ ธ์ค๋ ๊ฒ ๊ฐ์ ๋๋์ด ์๋๋ฐ์, ์๋ก์ด ์๋ ๋จผํธ๋ฅผ ๋ง๋ค์ด์ ๋ฐํํ๋ ์ญํ ์ ํด์ฃผ๊ณ ์์ผ๋ `get` ๋์ `create`๋ผ๋ ์ด๋ฆ์ผ๋ก ๋ค์ด๋ฐํด๋ ์ข์ ๊ฒ ๊ฐ๋ค์ :) |
@@ -1,83 +1,112 @@
import GithubApiController from "@controllers/githubController";
import User from "@models/User";
+import {
+ NO_SEARCH_RESULT_TEMPLATE,
+ SEARCH_LOADING_TEMPLATE,
+ getReposTemplate,
+ NO_REPOS_TEMPLATE,
+} from "@templates/search";
+import { SPINNER_TEMPLATE } from "@templates/spinner";
+impo... | JavaScript | ์ง๋๋ฒ์ `keyCode`๋ก ์ฒ๋ฆฌํ์ ๋ ๋ณด๋ค ์ด๋ค ํค๋ฅผ ๋๋ ์ ๋ ๋์ํ๋ ๋ก์ง์ธ์ง ํ์
ํ๊ธฐ๊ฐ ์ฌ์์ก๋ค์ ๐ |
@@ -0,0 +1,65 @@
+import History from "@models/History";
+import {
+ getHistoryItemTemplate,
+ NO_HISTORY_TEMPLATE,
+} from "@templates/history";
+
+export default class HistoryController {
+ constructor(historyContainer) {
+ this.historyContainer = historyContainer;
+ this.numberOfHistory = 0;
+ this._init... | JavaScript | ์ง์ด์ฃผ์ ๋ณ์๋ช
๋ ์ถฉ๋ถํ ์๋ฏธํ์
์ด ์๋๋๋ฐ์! ํน์ ์ข๋ ๊ฐ๊ฒฐํ ๋ณ์๋ช
์ ์ํ์ ๋ค๋ฉด `historyCount` ๋ก ๋ค์ด๋ฐํ๋ ๋ฐฉ๋ฒ๋ ์์ ๊ฒ ๊ฐ์ต๋๋ค ใ
ใ
|
@@ -1,11 +1,13 @@
import Repo from "@models/Repo";
+import { getDateDiff } from "@utils/dateUtils";
export default class User {
constructor({
id,
avatar_url,
created_at,
email,
+ bio,
followers,
following,
login,
@@ -22,57 +24,114 @@ export default class User {
this.id ... | JavaScript | `loginId` ๋ง ์นด๋ฉ์ผ์ด์ค๋ก ์ ์ ๋์ด์๋ค์! ๋ณ์๋ช
ํ๊ธฐ๋ฒ์ ํต์ผ์ํค๋ฉด ์ข์ ๊ฒ ๊ฐ์์ |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | ๊ทธ ๋ถ๋ถ์ ์ ๊ฒฝ์ฐ์ง ๋ชปํ๋ค์!
ํ๊ตญ ์๋น์ค์์๋ alt๋ ํ๊ธ๋ก ์ ์ด์ฃผ๋๊ฒ ๋ ๋์๊น์? |
@@ -1,83 +1,112 @@
import GithubApiController from "@controllers/githubController";
import User from "@models/User";
+import {
+ NO_SEARCH_RESULT_TEMPLATE,
+ SEARCH_LOADING_TEMPLATE,
+ getReposTemplate,
+ NO_REPOS_TEMPLATE,
+} from "@templates/search";
+import { SPINNER_TEMPLATE } from "@templates/spinner";
+impo... | JavaScript | ๊ธฐ์กด vs ์๋ก ์์ฑ์ ๋ค๋ฅธ ๊ฒฝ์ฐ๋๊น create๊ฐ ๋ ๋ช
ํํ๊ฒ ๋ค์ :) |
@@ -0,0 +1,65 @@
+import History from "@models/History";
+import {
+ getHistoryItemTemplate,
+ NO_HISTORY_TEMPLATE,
+} from "@templates/history";
+
+export default class HistoryController {
+ constructor(historyContainer) {
+ this.historyContainer = historyContainer;
+ this.numberOfHistory = 0;
+ this._init... | JavaScript | ๊ฐ๊ฒฐํ ๋ฒ์ ๋ ๊ด์ฐฎ๊ตฐ์ ใ
ใ
|
@@ -1,11 +1,13 @@
import Repo from "@models/Repo";
+import { getDateDiff } from "@utils/dateUtils";
export default class User {
constructor({
id,
avatar_url,
created_at,
email,
+ bio,
followers,
following,
login,
@@ -22,57 +24,114 @@ export default class User {
this.id ... | JavaScript | ๊ฐ์ฒด ํ๋กํผํฐ๋ฅผ ๋ณต์ฌํด์ค๋ ๊ณผ์ ์์ ๋ค๋ฅธ ๋ถ๋ถ์ ์ ๊ฒฝ์ ์ฐ์ง ๋ชปํ๋ค์...! ํต์ผ ์์ผ๋ณด๊ฒ ์ต๋๋ค |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | ๋ต~ ์ ๊ฐ ์ง๊ธ ์งํํ๊ณ ์๋ ํ๋ก์ ํธ์ ๊ฒฝ์ฐ ๋ค ํ๊ธ๋ก alt ์ ์ด์ฃผ๊ณ ์์ต๋๋ค! |
@@ -19,41 +19,56 @@ export default class Repo {
}) {
this.id = id;
this.name = name;
- this.full_name = full_name;
+ this.fullName = full_name;
this.owner = owner;
- this.html_url = html_url;
+ this.htmlUrl = html_url;
this.description = description;
- this.stargazers_count = starg... | JavaScript | ์ํ! ์ฐธ๊ณ ํด์ ์งํํด๋ณด๋๋ก ํ๊ฒ ์ต๋๋ค~ |
@@ -5,8 +5,17 @@
import nextstep.security.authentication.AuthenticationException;
import nextstep.security.authentication.BasicAuthenticationFilter;
import nextstep.security.authentication.UsernamePasswordAuthenticationFilter;
+import nextstep.security.authorization.AnyRequestMatcher;
+import nextstep.security.autho... | Java | > ๊ทธ ์ธ ๋ชจ๋ ์์ฒญ์ ๊ถํ์ ์ ํํ๊ธฐ ์ํด DenyAllAuthorizationManager๋ก ์ฒ๋ฆฌ
์ด์ธ ์์ฒญ์ ์คํจ์ฒ๋ฆฌ ํ๋ ๊ฒ์ด ์๊ตฌ์ฌํญ์ผ๋ก ๋ณด์ฌ์ง๋๋ค~ |
@@ -5,8 +5,17 @@
import nextstep.security.authentication.AuthenticationException;
import nextstep.security.authentication.BasicAuthenticationFilter;
import nextstep.security.authentication.UsernamePasswordAuthenticationFilter;
+import nextstep.security.authorization.AnyRequestMatcher;
+import nextstep.security.autho... | Java | /members/me ์์ฒญ๋ ํด๋น Filter๋ฅผ ํ๋๋ก ์์ ํ์ ์ด์ ๊ฐ ์์๊น์? |
@@ -0,0 +1,20 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class AuthenticatedAuthorizationManager implements AuthorizationManager<HttpServletRequest> {
+
+ @Override
+ public AuthorizationDecisio... | Java | ํด๋น Manager์์ ์์ธ๋ฅผ ๋ฐ์์ํค๋ ๊ฒ์ ๊ธฐ๋ณธ ์ธ๊ฐ ํ๋ฆ๊ณผ ์กฐ๊ธ ๋ง์ง ์๋ ๋ฐฉํฅ์ผ๋ก ๋ณด์ฌ์ง๋ค์!
AuthorizationDecision(false)๋ฅผ ์๋ตํ๋ ๋ฐฉํฅ์ผ๋ก ๊ฐ์ ํด๋ณด๋ฉด ์ด๋จ๊น์? |
@@ -9,30 +9,25 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.util.Set;
public class CheckAuthenticationFilter extends OncePerRequestFilter {
- private static final String DEFAULT_REQUEST_URI = "/members";
+ privat... | Java | decision.result์ ์ ๊ทผ์ ์ด์๋ฅผ private๋ก ์ค์ ํ์ง ์์ ์ด์ ๊ฐ ์์ผ์ค๊น์? |
@@ -0,0 +1,23 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class RequestMatcherEntry<T extends AuthorizationManager> {
+
+ private final RequestMatcher requestMatcher;
+ private final T entry;
+
+... | Java | ํด๋น ์ฝ๋์ AuthorizationManager๋ก ๊ฐ์ ์บ์คํ
ํ๋ ์ฝ๋๊ฐ ์กด์ฌํ๊ณ ์๋ค์! ์ด๋ ๊ฒ ๊ตฌํํ ๊ฒฝ์ฐ ์ ๋ค๋ฆญ์ ์ฌ์ฉํ ์ฅ์ ์ด ์์ด์ง ๊ฒ ๊ฐ์๋ฐ์.
์ ๋ค๋ฆญ์ ํ์ฉํ์ฌ ๊ฐ์ ์บ์คํ
์์ด ๊ตฌํํด๋ณด๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1,23 @@
+package nextstep.security.authorization;
+
+import nextstep.security.authentication.Authentication;
+import org.aopalliance.intercept.MethodInvocation;
+
+import java.lang.reflect.Method;
+
+public class SecuredAuthorizationManager implements AuthorizationManager<MethodInvocation> {
+
+ @Override
+... | Java | ํด๋น ์์น์์๋ ์์ธ๋ฅผ ๋ฐ์์ํค๋ ๊ฒ์ด ์์ฐ์ค๋ฌ์ด ํ๋ฆ์ผ์ง ๊ณ ๋ฏผํด๋ณด๋ฉด ์ข๊ฒ ์ต๋๋ค :) |
@@ -0,0 +1,23 @@
+package nextstep.security.authorization;
+
+import nextstep.security.authentication.Authentication;
+import org.aopalliance.intercept.MethodInvocation;
+
+import java.lang.reflect.Method;
+
+public class SecuredAuthorizationManager implements AuthorizationManager<MethodInvocation> {
+
+ @Override
+... | Java | ์ ์ ํฉํฐ๋ฆฌ ๋ฉ์๋๋ฅผ ํตํด ์๋ฏธ๋ฅผ ๋ํ๋ด๋ ๊ฒ์ด ๋๋ฌด ์ข๋ค์ ๐
๋ค๋ง ์ธ์ฆ์ด ์ฑ๊ณตํ์ ๊ฒฝ์ฐ๋ ์์ฑ์๋ฅผ ํตํด ์์ฑํ๊ณ , ์คํจ์ ๊ฒฝ์ฐ ์ ์ ํฉํฐ๋ฆฌ ๋ฉ์๋๋ฅผ ์ฌ์ฉํ๋ ๊ฒ ๋ณด๋ค ๋ฐฉ์์ ํต์ผํ๋ฉด ์ฝ๋์ ์ผ๊ด์ฑ์ด ์๊ธธ ๊ฒ ๊ฐ์๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -1,7 +1,6 @@
package nextstep.security.authorization;
import nextstep.security.authentication.Authentication;
-import nextstep.security.authentication.AuthenticationException;
import nextstep.security.context.SecurityContextHolder;
import org.aopalliance.aop.Advice;
import org.aopalliance.intercept.MethodInte... | Java | ์ธ์ฆ ๊ณผ์ ์ผ๋ก ๋ดค์ ๋ ํด๋น ์ฝ๋๋ ๋จ์์์ด์ผ ํ์ง ์์๊น์? |
@@ -0,0 +1,59 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+import nextstep.security.authentication.UsernamePasswordAuthenticationToken;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Te... | Java | ์ถ๊ฐ ํ
์คํธ๋ค ๋๋ฌด ์ข๋ค์ ๐ฏ |
@@ -0,0 +1,26 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+import java.util.List;
+
+public class RequestAuthorizationManager implements AuthorizationManager<HttpServletRequest> {
+
+ private List<RequestMa... | Java | > ์ด๋ฏธ Reuqest URI์ ํด๋นํ๋ Matcher๋ฅผ ํ ๋ฒ ๋ง๋๊ฒ ๋๋ฉด ๋ฐ๋ก ๋ฐํ์ ํ๋๊ฒ ๋ง์๊น์?
๋ต ํ ๋ฒ ๋งค์นญ์ด ๋๋ฉด ์ถ๊ฐ์ ์ผ๋ก ํ์ธํ ํ์๋ ์์ด๋ณด์
๋๋ค! ์ผ๋ฐ์ ์ผ๋ก ์์ฒญ URI ํ๋์ ํ๋์ ์ ์ฑ
๋ง ์ ์ฉ๋๋ ๊ฒ์ด ์์ฐ์ค๋ฌ์ธ ๊ฒ ๊ฐ์์ ใ
ใ
|
@@ -0,0 +1,20 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class AuthenticatedAuthorizationManager implements AuthorizationManager<HttpServletRequest> {
+
+ @Override
+ public AuthorizationDecisio... | Java | ํน์๋ Authentication๊ฐ ์๋ ์์ฒญ์ด ๋ค์ด์ฌ ๊ฒ์ ์๊ฐํด์ ํด๋น ๋ก์ง์ ์์ฑํ์๋๋ฐ..
์ฌ์ค ์ธ๊ฐ ํ์ธํ๋ ๋ถ๋ถ์๋ ๋ชจ๋ ์ธ์ฆ์ด ๋์๋ค๊ณ ํ๋จํ๋๊ฒ ๋ง๊ฒ ์ฃ ...? ๐
|
@@ -9,30 +9,25 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.util.Set;
public class CheckAuthenticationFilter extends OncePerRequestFilter {
- private static final String DEFAULT_REQUEST_URI = "/members";
+ privat... | Java | ์~ ์ ํ ๋ชฐ๋๋ค์;;;! ๐
|
@@ -1,7 +1,6 @@
package nextstep.security.authorization;
import nextstep.security.authentication.Authentication;
-import nextstep.security.authentication.AuthenticationException;
import nextstep.security.context.SecurityContextHolder;
import org.aopalliance.aop.Advice;
import org.aopalliance.intercept.MethodInte... | Java | AuthorizationManager ๋ด๋ถ์์ Authentication๋ฅผ null ์ฒดํฌ ํ๋ค๊ณ ํด๋น ๋ก์ง์ ์ ๊ฑฐ ํ์๋๋ฐ,
SecuredAuthorizationManager๊ฐ ์ธ๊ฐ๋ง์ ์ฒดํฌํ๋ ๊ฒ์ด๊ธฐ ๋๋ฌธ์.. ํด๋น ๋ก์ง์ด ๋จ์ ์๋๊ฒ ๋ง์๋ณด์ด๋ค์ฅ ใ
0ใ
|
@@ -5,8 +5,17 @@
import nextstep.security.authentication.AuthenticationException;
import nextstep.security.authentication.BasicAuthenticationFilter;
import nextstep.security.authentication.UsernamePasswordAuthenticationFilter;
+import nextstep.security.authorization.AnyRequestMatcher;
+import nextstep.security.autho... | Java | 6e7360ff3c84e4862361e19f324a96ae1baeb16a ์ ๋ฐ์ํ์์ต๋๋ค! |
@@ -5,8 +5,17 @@
import nextstep.security.authentication.AuthenticationException;
import nextstep.security.authentication.BasicAuthenticationFilter;
import nextstep.security.authentication.UsernamePasswordAuthenticationFilter;
+import nextstep.security.authorization.AnyRequestMatcher;
+import nextstep.security.autho... | Java | ์ธ๊ฐ ๊ตฌํ ์ ์, ํน์ URI๋ง ์ฒ๋ฆฌํด์ค๋ค๊ณ , ์์ฑํ๋ ๋ก์ง์
๋๋น
์ง๊ธ์ ์ธ๊ฐ ๋ถ๋ถ์์ ์ฒ๋ฆฌ๋ฅผ ํ ์ ์๊ธฐ์ 7f9b37e03636d45d53340e4c1c40f9c938d56263 ํด๋น ์ปค๋ฐ์์ ์ ๊ฑฐํด ๋์์ต๋๋ค ๐
|
@@ -0,0 +1,20 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class AuthenticatedAuthorizationManager implements AuthorizationManager<HttpServletRequest> {
+
+ @Override
+ public AuthorizationDecisio... | Java | 605be945e21c24abe9040c8cbdad211f05132edc ํด๋น ๋ถ๋ถ์ ํตํด ๋ฐ์ํ์์ต๋๋ค! |
@@ -9,30 +9,25 @@
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
-import java.util.Set;
public class CheckAuthenticationFilter extends OncePerRequestFilter {
- private static final String DEFAULT_REQUEST_URI = "/members";
+ privat... | Java | bd27412e9a027651567f25f0e51b725454af6e8c ๋ฅผ ํตํด ํธ๋ค๋ฅ ์์ ํ์์ต๋๋ค! |
@@ -0,0 +1,23 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class RequestMatcherEntry<T extends AuthorizationManager> {
+
+ private final RequestMatcher requestMatcher;
+ private final T entry;
+
+... | Java | 682a3ed6d8e7087121230ad169934e5193a5c73b ๋ฅผ ํตํด ์ฒ๋ฆฌ๋ฅผ ํด ๋ณด์์ต๋๋ค. |
@@ -0,0 +1,23 @@
+package nextstep.security.authorization;
+
+import nextstep.security.authentication.Authentication;
+import org.aopalliance.intercept.MethodInvocation;
+
+import java.lang.reflect.Method;
+
+public class SecuredAuthorizationManager implements AuthorizationManager<MethodInvocation> {
+
+ @Override
+... | Java | 589bd7f23cba24fe7845d0c83f8227d0d3c10b83 ์์ ์ฒ๋ฆฌํ์์ต๋๋ค.
ํ์ด๋ก ๊ฐ๋ฐ ํ ๋, ํ์ด์ง์ด ์ง์ฃผ์ ๊ฑฐ์๋๋ฐ ๐
์ฑ๊ณต์ ๊ฒฝ์ฐ์๋, ํฉํ ๋ฆฌ ๋ฉ์๋๋ฅผ ํตํด ์์ฑ๋ ์ ์๋๋ก ์์ ํ์์ต๋๋ค |
@@ -0,0 +1,29 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+import org.junit.jupiter.api.DisplayName;
+import org.junit.jupiter.api.Test;
+import org.springframework.mock.web.MockHttpServletRequest;
+
+import sta... | Java | ํ
์คํธ ๐๐๐ |
@@ -0,0 +1,20 @@
+package nextstep.security.authorization;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+
+public class AuthenticatedAuthorizationManager implements AuthorizationManager<HttpServletRequest> {
+
+ @Override
+ public AuthorizationDecisio... | Java | > ํน์๋ Authentication๊ฐ ์๋ ์์ฒญ์ด ๋ค์ด์ฌ ๊ฒ์ ์๊ฐํด์ ํด๋น ๋ก์ง์ ์์ฑํ์๋๋ฐ..
์ฌ์ค ์ธ๊ฐ ํ์ธํ๋ ๋ถ๋ถ์๋ ๋ชจ๋ ์ธ์ฆ์ด ๋์๋ค๊ณ ํ๋จํ๋๊ฒ ๋ง๊ฒ ์ฃ ...? ๐
๋ต!! ๋ณดํต ์ธ๊ฐ ๋ก์ง์์๋ ์ธ์ฆ์ด ์๋ฃ๋ฃ๋ ์ํ๋ผ๊ณ ๊ฐ์ ํ๋๊ฒ ์ข๊ณ , ๋ง์ฝ null์ด ์ฌ ์ ์๋๋ฉด ์ถ์ํ ๋ ๋ฒจ์ ์๊ฐํด์ ๋ค๋ฅธ ์์ธ๊ฐ ๋ฐ์ํ๋ ๊ฒ์ด ๋ ์์ฐ์ค๋ฌ์ธ ๊ฒ ๊ฐ์ต๋๋ค ใ
ใ
|
@@ -0,0 +1,58 @@
+package nextstep.app.config;
+
+import nextstep.security.authentication.*;
+import nextstep.security.context.HttpSessionSecurityContextRepository;
+import nextstep.security.context.SecurityContextRepository;
+import nextstep.security.domain.MemberDetailService;
+import nextstep.security.filter.*;
+imp... | Java | ํํฐ์ ์์๋ ์ค์ํฉ๋๋ค!
SecurityContextHolderFilter๋ BasicAuthenticationFilter, LoginAuthenticationFilter๋ณด๋ค ๋จผ์ ์ค์ ๋์ด์ผ ํ ๊ฒ ๊ฐ์์~ |
@@ -0,0 +1,77 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | ๊ฐ ํํฐ์์ SecurityContext๋ฅผ ์ฌ์ฉํ ๋๋ SecurityContextHolder๋ฅผ ํตํด ์ฌ์ฉํ๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.exception.FilterChainNotFoundException;
+import org.springframework.web.filter.GenericFilterBean;
+
+import java.io.IOException;
+import java.util.List;
+
+public c... | Java | ์ง๊ธ์ ๋ชจ๋ ์ฒด์ธ์ ํํฐ๋ฅผ ์คํํ๊ณ ์๋๋ฐ์. ์ง๊ธ ํ๋ก์ ํธ์์ ํ๋์ ํํฐ ์ฒด์ธ๋ง ์ฌ์ฉํ๊ณ ์์ง๋ง, ์ฌ๋ฌ ํํฐ ์ฒด์ธ์ ์ฌ์ฉํ ์ ๊ฒฝ์ฐ ๋ฌธ์ ๊ฐ ์๊ธธ ์ ์์ ๊ฒ ๊ฐ์๋ฐ ์ด๋ป๊ฒ ์๊ฐํ์๋์? |
@@ -0,0 +1,67 @@
+package nextstep.security.filter;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import nextstep.... | Java | > ์์ธ ๋ฐ์ ์ clearContext๋ ExceptionHandlerFilter์์ ์ํํ๋๋ก ๊ตฌํํ๊ณ , ์์ฒญ ์๋ฃ ํ clearContext๋ SecurityContextHolderFilter์์ ์ํํ๋๋ก ๊ตฌํํ์ต๋๋ค. ์ด๊ฒ ๋ง๋ ๋ฐฉ์์ธ์ง ๊ถ๊ธํฉ๋๋ค.
Filter์ ์ญํ ์ ์ ๋๋ ์ฃผ์
จ์ด์ ๐
์กฐ๊ธ ๋ ์ฝ๋๋ฅผ ๋ฐ์ ์์ผ ๋ณธ๋ค๋ฉด ์์ธ ์ํฉ์ ๋ฐ๋ฅธ ์์ธ ์ฒ๋ฆฌ๊ฐ ์ถ๊ฐ๋๊ณ , SecurityContextHolder์ ๊ด๋ จ๋ ๋ชจ๋ ์ญํ ์ SecurityContextHolderFilter์์ ๋ด๋นํ๋๋ก ํด๋ณด๋ฉด ์ข์ ๊ฒ ๊ฐ์ต๋๋ค! |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | SPRING_SECURITY_CONTEXT_KEY๋ฅผ ๊ธฐ๋ฐ์ผ๋ก ์ฒ๋ฆฌํ๋ ์ญํ ์ SecurityContextRepository์๊ฒ ๋๊ฒจ์ฃผ๋ฉด ์ข๊ฒ ๋ค์! |
@@ -0,0 +1,39 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import... | Java | > 4๋จ๊ณ SecurityContextHolderFilter ๊ตฌํ ์ค clearContext๋ฅผ SecurityContextHolderFilter์์ ์ํํ๋ ๊ฒ ๋ง๋ค๊ณ ์๊ฐํ๋๋ฐ, clearContext๋ฅผ ์ํํ๋ฉด ํ
์คํธ๊ฐ ์คํจํฉ๋๋ค. ์ผ๋จ ์ ์ถ์ ์ํด ์ฃผ์์ฒ๋ฆฌํ๋๋ฐ, ํ
์คํธ๊ฐ ์คํจํ๋ ์ด์ ๊ฐ ๊ถ๊ธํฉ๋๋ค.
```suggestion
securityContextRepository.saveContext(securityContext, httpRequest, httpResponse);
SecurityContextHolder.... |
@@ -0,0 +1,58 @@
+package nextstep.app.config;
+
+import nextstep.security.authentication.*;
+import nextstep.security.context.HttpSessionSecurityContextRepository;
+import nextstep.security.context.SecurityContextRepository;
+import nextstep.security.domain.MemberDetailService;
+import nextstep.security.filter.*;
+imp... | Java | SecurityContextHolderFilter ๊ฐ ๋จผ์ ์คํ์ด ๋์ด์ผ ์์ฒญ์ด ์์ํ๊ณ ๋๋ ๋ SecurityContext๋ฅผ ์ ์ ํ๊ฒ ์ฒ๋ฆฌํ ์ ์๊ฒ ๋ค์. ์ ๊ฐ ์ดํดํ ๋ถ๋ถ์ด ๋ง์๊น์? |
@@ -0,0 +1,39 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import... | Java | ์ด์ ๋ฅผ ์ ๋ชจ๋ฅด๊ฒ ๋ค์.. ใ
ใ
๊ทผ๋ฐ ์์ ํ๋ค๊ฐ ๋ ์๊ฐ์ธ๋ฐ, ๊ฐ ํํฐ์์ `securityContextRepository.saveContext` ๋ฅผ ์ํํ๊ณ ์์ผ๋๊น SecurityContextHolderFilter์์๋ saveContext ์ํ์ ์ ํด๋ ๋์ง ์๋์? |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.*;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.exception.FilterChainNotFoundException;
+import org.springframework.web.filter.GenericFilterBean;
+
+import java.io.IOException;
+import java.util.List;
+
+public c... | Java | ํ๋์ ํํฐ ์ฒด์ธ๋ง ์ฌ์ฉํ๋ ๊ฒ ๋ณด์ฅ๋๋ ๊ฒ์ด ์ข์ ๊ฒ ๊ฐ์์.
์ด ์์ฒญ์ด filterChain์ ๋ง๋ ์์ฒญ์ธ์ง ํ์ธํ๋ ๋ฉ์๋๊ฐ ํ์ํ ๊ฒ ๊ฐ์ต๋๋ค. |
@@ -0,0 +1,67 @@
+package nextstep.security.filter;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import nextstep.... | Java | ํํฐ ์์๋ฅผ ๋ณ๊ฒฝํ๊ณ (SecurityContextHolderFilter -> Basic -> Login)
SecurityContextHolderFilter ์ finally ์ ์์ clearContext๋ฅผ ์ํํ๋๊น ๊ตณ์ด ExceptionHandlerFilter์์ ์ํ์ ์ ํด๋ ๋ ๊ฒ ๊ฐ์๋ฐ ์ ๊ฐ ์ดํดํ ๋ด์ฉ์ด ๋ง์๊น์? |
@@ -0,0 +1,58 @@
+package nextstep.app.config;
+
+import nextstep.security.authentication.*;
+import nextstep.security.context.HttpSessionSecurityContextRepository;
+import nextstep.security.context.SecurityContextRepository;
+import nextstep.security.domain.MemberDetailService;
+import nextstep.security.filter.*;
+imp... | Java | > SecurityContextHolderFilter ๊ฐ ๋จผ์ ์คํ์ด ๋์ด์ผ ์์ฒญ์ด ์์ํ๊ณ ๋๋ ๋ SecurityContext๋ฅผ ์ ์ ํ๊ฒ ์ฒ๋ฆฌํ ์ ์๊ฒ ๋ค์. ์ ๊ฐ ์ดํดํ ๋ถ๋ถ์ด ๋ง์๊น์?
์ ํํ ์ดํดํด์ฃผ์
จ๋ค์ ๐ |
@@ -0,0 +1,58 @@
+package nextstep.app.config;
+
+import nextstep.security.authentication.*;
+import nextstep.security.context.HttpSessionSecurityContextRepository;
+import nextstep.security.context.SecurityContextRepository;
+import nextstep.security.domain.MemberDetailService;
+import nextstep.security.filter.*;
+imp... | Java | HttpSessionSecurityContextRepository๋ฅผ ๋งค๋ฒ ์์ฑํ์ง ์๊ณ , Spring Bean์ผ๋ก ๋ฑ๋กํ์ฌ ์ฌ์ฌ์ฉํด๋ณด๋ฉด ์ด๋จ๊น์? |
@@ -0,0 +1,67 @@
+package nextstep.security.filter;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import nextstep.... | Java | > ํํฐ ์์๋ฅผ ๋ณ๊ฒฝํ๊ณ (SecurityContextHolderFilter -> Basic -> Login)
SecurityContextHolderFilter ์ finally ์ ์์ clearContext๋ฅผ ์ํํ๋๊น ๊ตณ์ด ExceptionHandlerFilter์์ ์ํ์ ์ ํด๋ ๋ ๊ฒ ๊ฐ์๋ฐ ์ ๊ฐ ์ดํดํ ๋ด์ฉ์ด ๋ง์๊น์?
๋ง์ต๋๋ค ๐
์ถ๊ฐ๋ก AuthenticationException ์ด์ธ์ ๋ค๋ฅธ ์์ธ๋ ์ด๋ค๊ฒ ๋ฐ์ํ ์ ์๊ณ , ์ด๋ป๊ฒ ์ฒ๋ฆฌํ๋ฉด ์ข์์ง ๊ณ ๋ฏผํด๋ณด๋ ๊ฒ๋ ํ์ต์ ๋์์ด ๋ ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | SPRING_SECURITY_CONTEXT_KEY์ ์ญํ ์ด HttpSessionSecurityContextRepository๋ก ๋์ด๊ฐ์ผ๋, ํด๋น ์์๋ HttpSessionSecurityContextRepository๋ก ๋์ด๊ฐ๋ฉด ์ญํ ์ด ๋ช
ํํด ์ง ๊ฒ ๊ฐ์์! |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | > ์ด์ ๋ฅผ ์ ๋ชจ๋ฅด๊ฒ ๋ค์.. ใ
ใ
๊ทผ๋ฐ ์์ ํ๋ค๊ฐ ๋ ์๊ฐ์ธ๋ฐ, ๊ฐ ํํฐ์์ securityContextRepository.saveContext ๋ฅผ ์ํํ๊ณ ์์ผ๋๊น SecurityContextHolderFilter์์๋ saveContext ์ํ์ ์ ํด๋ ๋์ง ์๋์?
๋ฐ๋๋ก ์ ๊ทผํ ์๋ ์์ ๊ฒ ๊ฐ์์! ์ง๊ธ์ ๊ตฌ์กฐ์์ ๊ฐ ํํฐ์์ `saveContext`๋ฅผ ํธ์ถํด์ค์ผ ํ๋๋ฐ, SecurityContextHolderFilter์์ ๋ด๋นํ๊ฒ ๋๋ค๋ฉด ๊ฐ ํํฐ์์ SecurityContext์ ๋ํ ์ ๊ฒฝ์ ์์ฐ๋๋ก ๋ง๋ค ์ ์์ต๋๋ค~ |
@@ -0,0 +1,77 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | ๊ฐ Filter๊ฐ SecurityContextRepository์ ๋ํ ์์กด์ฑ์ ๊ฐ์ง๊ณ ์๋๋ก ๊ตฌํํด์ฃผ์
จ๋ค์.
์คํ๋ง์ ๋ค๋ฅธ Filter์์ SecurityContextRepository์ ๋ด๋ถ ๊ตฌํ์ ๋ชฐ๋ผ๋ SecurityContextHolder.getContext()๋ฅผ ํตํด ์ธ์ฆ ์ ๋ณด๋ฅผ ํ์ฉํ ์ ์๋๋ก ์ค๊ณ๋์ด ์๋๋ฐ์.
์ด๋ ๊ฒ ๊ตฌ์กฐ๋ฅผ ์ค๊ณํ ์ด์ ์ ๋ํด ๊ณ ๋ฏผํด๋ณด์๋ฉด ์ข๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,67 @@
+package nextstep.security.filter;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import nextstep.... | Java | ๋ก๊ทธ์ธ ์์ ์
๋ ฅ๊ฐ์ด ๋๋ฝ๋์ ๊ฒฝ์ฐ์ ์์ธ์ฒ๋ฆฌ๋ฅผ ์ถ๊ฐํ๊ณ ,
ExceptionHandlerFilter ์์์ ์๋ฌ ์๋ต๊ฐ ์์ฑ ๋ก์ง์ ์ถ๊ฐํ์ต๋๋ค. ๊ทธ๋ฆฌ๊ณ ์์ ๋ชปํ ์์ธ๋ 500 ์๋ฌ ์ฒ๋ฆฌํ๋๋ก ๊ตฌํํ์ต๋๋ค..! |
@@ -0,0 +1,56 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | SecurityContextHolderFilter์ ์ญํ ์ ๋ํด ๋ค์ ์๊ฐํด๋ณด๊ฒ ๋์์ต๋๋ค. ๊ฐ์ฌํฉ๋๋ค! |
@@ -0,0 +1,77 @@
+package nextstep.security.filter;
+
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
... | Java | SecurityContextHolderFilter๋ง SecurityContextRepository์ ๋ํ ์์กด์ฑ์ ๊ฐ์ง๋๋ก ์์ ํ์ต๋๋ค! |
@@ -0,0 +1,67 @@
+package nextstep.security.filter;
+
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.http.HttpServletResponse;
+import nextstep.... | Java | ```suggestion
try {
chain.doFilter(request, response);
} catch (AuthenticationException e) {
} catch (IllegalArgumentException e) {
} catch (Exception e) {
}
```
instanceof ๋์ ์์ ๊ฐ์ด ์์ฑํ๋๊ฒ ๋ ๋ช
ํํ ๊ฒ ๊ฐ๋ค์! |
@@ -1,70 +1,10 @@
-# Getting Started with Create React App
+# React Westagram 3ํ
-This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
+instagram์ ๋ชจํฐ๋ธ๋ก ํ ํด๋ก ํ ํ๋ก์ ํธ
-## Available Scripts
+# ํ์
-In the project directory, you can run:
-
-### `npm start`
-
-Runs the app... | Unknown | ๐ README.md ํ์ผ ์์ ํด์ฃผ์
์ ๊ฐ์ฌํฉ๋๋ค ^^ |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | ๋ ์ด์ ์ฌ์ฉํ์ง ์๋ ๋ถํ์ํ ์ฝ๋์ ๋ํ ์ฃผ์์ ๊ผญ ์ญ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | ์ฝ์๋ ๋ง์ฐฌ๊ฐ์ง์
๋๋ค ํ
์คํธ๊ฐ ๋๋ ์ฝ๋๋ ํญ์ ์ง์์ฃผ์ธ์!
์๋์ ๋จ์์๋ ๋ชจ๋ ์ฝ์์ ์ญ์ ํด์ฃผ์ธ์ |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | ๐ useEffect ๊น์ง ํ์ฉํด๋ณด์
จ๊ตฐ์!
condition ๋ณ์๊ฐ userInfo๋ผ๋ state๋ฅผ ์ด๋ฏธ ์ฐธ์กฐํ ๊ฐ์ด๊ธฐ๋๋ฌธ์ isActive๋ผ๋ ๊ฐ์ ๋ฐ๋ก state๋ก ๊ด๋ฆฌํ์ง์์๋
condition ๋ณ์๊ฐ ์ฐธ์กฐํ๊ณ ์๋ ๊ฐ์ด ์ด๋ฏธ state๋ผ์ state๋ณํ์ ๋ฐ๋ผ ์ฆ๊ฐ์ ์ผ๋ก ๋ค๋ฅธ ๊ฐ์ ๊ฐ์ง ์ ์์ต๋๋ค.
isActive๋ฅผ state๊ฐ ์๋ ์ผ๋ฐ๋ณ์๋ก ๊ด๋ฆฌํด๋ณด์๋๊ฒ ์ด๋จ๊น์? |
@@ -0,0 +1,61 @@
+import React, { useState, useEffect } from "react";
+import { useNavigate } from "react-router-dom";
+import "./Login.scss";
+
+const Login = () => {
+ const navigate = useNavigate();
+ const [showErrorMessage, setShowErrorMessage] = useState(false);
+
+ const [userInfo, setUserInfo] = useState({
+... | Unknown | ๐ ์กฐ๊ฑด๋ถ๋๋๋ง ํ์ฉํด๋ณด์
จ๊ตฐ์!! ์คํ๋ ค showErrorMessage๋ฅผ ๊ด๋ฆฌํ๋ ํจ์๋ฅผ useEffectํจ์ ๋ด์์ ์ ์ธํ condition๊ฐ์ ๋ฐ๋ผ ๋ค๋ฅด๊ฒ ๊ด๋ฆฌํด๋ณผ ์ ์๊ฒ ์ต๋๋ค! |
@@ -0,0 +1,144 @@
+.login {
+ width: 100%;
+ height: 100vh;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ align-items: center;
+
+ .box {
+ padding: 25px 40px;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 100%;
+ max-width: 350px;
+ box... | Unknown | ์นํฐํธ ๊ฐ์๊ฒฝ์ฐ๋ index.htmlํ์ผ์์ ์ถ๊ฐํ ์๋ ์๊ณ
common.scss์์ ๊ด๋ฆฌํ ์๋ ์์ต๋๋ค |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | reset.scss ํ์ผ๋ ๋ง์ฐฌ๊ฐ์ง๋ก ์ ์ญ์์ ์ ์ฉ๋์ด์ผ ํ๋ ํ์ผ์์ผ๋ก index.js์์ importํด ์ค๋๊ฒ์ด ์ข์ต๋๋ค. |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | ์์ด์ฝ๋ค์ ๋๋ ์๋ ํน์ ํ์ด์ง๋ก ์ด๋ํด์ผํ๋๊ฒ์ด ์๋๋ผ๋ฉด a ํ๊ทธ๋ Link ํ๊ทธ๊ฐ ์๋ ์ฌํ ๋ค๋ฅธํ๊ทธ๋ฅผ ํ์ฉํด์ ๊ธฐ๋ฅ์ ๊ตฌํํ ์ ์์ต๋๋ค! |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | ํด๋น ์๋๊ฒฝ๋ก๊ฐ publicํด๋๋ฅผ ์ฐธ๊ณ ํ๋๊ฑฐ๋ผ๋ฉด
```suggestion
<img alt="๊ณ์ ํ๋กํ ์ฌ์ง" src="/images/jisun/img_profile.png" />
```
์ด๋ ๊ฒ ํํํ ์ ์์ต๋๋ค |
@@ -0,0 +1,160 @@
+import React from "react";
+import "./Main.scss";
+import { Link, useNavigate } from "react-router-dom";
+
+const Main = () => {
+ const navigate = useNavigate();
+
+ const goToMain = () => {
+ navigate("/jisun-main");
+ };
+
+ return (
+ <div className="main">
+ <nav>
+ <Link t... | Unknown | className์ด ๋๋ฌด ๋ชจํธํฉ๋๋ค!! ์ด๋ค ์์ด์ฝ์ธ์ง ์๋ ค์ฃผ์ธ์ |
@@ -0,0 +1,40 @@
+package nextstep.security.context;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.... | Java | `SecurityContextHolderFilter`๋ ๊ฐ์ฅ ๋จผ์ SecurityContext๋ฅผ ๊ด๋ฆฌํ๋ฉฐ, ๋ง์ง๋ง์ผ๋ก SecurityContext๋ฅผ ๊ด๋ฆฌํด์ฃผ๋ ์ญํ ์ ํด์. ์์์ ์์ธ๊ฐ ๋ฐ์ํ๋ฉด `SecurityContext.clearContext`๊ฐ ์คํ์ด ์ด๋ ค์๋ณด์ฌ์. |
@@ -0,0 +1,40 @@
+package nextstep.security.context;
+
+import jakarta.servlet.Filter;
+import jakarta.servlet.FilterChain;
+import jakarta.servlet.ServletException;
+import jakarta.servlet.ServletRequest;
+import jakarta.servlet.ServletResponse;
+import jakarta.servlet.http.HttpServletRequest;
+import jakarta.servlet.... | Java | 053f96ece76768a3b187188eaf41110f9593b65e `finally`๋ฅผ ํตํด ์ต์ข
์ ์ผ๋ก `clear`๋ฅผ ํ ์ ์๋ ๊ตฌ์กฐ๋ก ๋ณ๊ฒฝ ํด ๋ณด์์ต๋๋ค. |
@@ -0,0 +1,27 @@
+package nextstep.security.filter.converter;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.security.authentication.Authentication;
+import nextstep.security.authentication.UsernamePasswordAuthenticationToken;
+
+import java.util.Map;
+
+public class LoginFormAuthenticationConverte... | Java | ```suggestion
try {
String username = parameterMap.get("username")[0];
String password = parameterMap.get("password")[0];
return new UsernamePasswordAuthenticationToken(username, password);
} catch (RuntimeException e) {
throw new IllegalArgumentExc... |
@@ -0,0 +1,33 @@
+package nextstep.security.filter.converter;
+
+import jakarta.servlet.http.HttpServletRequest;
+import nextstep.app.util.Base64Convertor;
+import nextstep.security.authentication.Authentication;
+import nextstep.security.authentication.UsernamePasswordAuthenticationToken;
+
+public class BasicAuthenti... | Java | ```suggestion
final String username = usernameAndPassword[0];
final String password = usernameAndPassword[1];
return new UsernamePasswordAuthenticationToken(username, password);
} catch (RuntimeException e) {
throw new IllegalArgumentException();
}
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.