Skip to content

IPleaseServer/account-server

Repository files navigation

Auth

Authorize Teacher

request

POST /api/v1/account/auth/teacher?identifier=* //교사인증기에서 인증코드를 가져오기위한 key값

response

{ }

Authorize Email

request

POST /api/v1/account/auth/email?email=*@*.*

response

{ }

Authorize

GET /api/v1/account/auth/{authCode}
{
  "token": "*****" //token has type and data of Authorization
}

Login

Generate Login Token

request

POST /api/v1/account/login
{
  "email": "*@gsm.hs.kr",
  "password": "***"
}

response

{
  "accessToken": "*****",
  "refreshToken": "*****"
}

Refresh Login Token

request

GET /api/v1/account/login/refresh
{
  "refreshToken": "*****"
}

response

{
  "accessToken": "*****",
  "refreshToken": "*****"
}

Logout

request

GET /api/v1/account/logout
Authorization: "액세스 토큰"

response

{ }

##Register

Register Student

request

POST /api/v1/account/register/student
{
  "name": "**",
  "emailToken": "*****",
  "password": "***",
  "studentNumber": 1101, //1101-3420
  "department": "스마트IOT"
}

response

{
  "accountId": 0
}

Register Teacher

request

POST /api/v1/account/register/teacher
{
  "name": "**",
  "emailToken": "*****",
  "password": "***",
  "teacherCode": "*****"
}

response

{
  "accountId": 0
}

##Profile

Get My Profile

request

GET /api/v1/account/profile
Authorization: "액세스 토큰"
GRPC getProfileByAccessToken(accessToken: String)

response

{
  "type": "", //TEACHER or STUDENT
  "common": {
    "accountId": 0,
    "name": "**",
    "email": "****",
    "profileImage": "*****" //URL
  },
  "studnet": { //null when type is TEACHER
    "schoolNumber": 1101, //1101-3420
    "department": "스마트IOT"
  },
  "teacher": { //null when type is STUDNET
    //teacher hasn't Public Information
  }
}

Get Profile

request

GET /api/v1/account/profile/{id}
GRPC getProfileById(accountId: Long)

response

{
  "type": "", //TEACHER or STUDENT
  "common": {
    "accountId": 0,
    "name": "**",
    "email": "****",
    "profileImage": "*****" //URL
  },
  "studnet": { //null when type is TEACHER
    "schoolNumber": 1101, //1101-3420
    "department": "스마트IOT"
  },
  "teacher": { //null when type is STUDNET
    //teacher hasn't Public Information
  }
}

About

iplease account server

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages