类 OrganizationAuthController


  • public class OrganizationAuthController
    extends Object
    默认认证 api 推荐使用 也可以不用此 api 但需要将 自定义 AuthHandler 的实现中的方法清空
    版本:
    0.3.6
    作者:
    scx567888
    • 构造器详细资料

      • OrganizationAuthController

        public OrganizationAuthController​(UserService userService)
        参数:
        userService - u
    • 方法详细资料

      • login

        public cool.scx.vo.Json login​(String username,
                                      String password,
                                      io.vertx.ext.web.RoutingContext ctx)
                               throws SQLException
        登录方法
        参数:
        username - 用户名
        password - 密码
        ctx - ctx
        返回:
        json
        抛出:
        SQLException - SQLException
      • signup

        public cool.scx.vo.Json signup​(String username,
                                       String password)
                                throws SQLException
        注册方法
        参数:
        username - 前台发送的用户名
        password - 前台发送的密码
        返回:
        a Json object.
        抛出:
        SQLException - SQLException
      • logout

        public cool.scx.vo.Json logout()
        退出登录方法 同时清空 session 里的登录数据
        返回:
        是否成功退出
      • info

        public cool.scx.vo.Json info()
                              throws cool.scx.exception.UnauthorizedException
        拉取当前登录用户的信息 (包括权限)
        返回:
        Json
        抛出:
        cool.scx.exception.UnauthorizedException - if any.
      • infoUpdate

        public cool.scx.vo.Json infoUpdate​(User newUserInfo)
                                    throws SQLException
        用户自己更新的信息 (不包括权限)
        参数:
        newUserInfo - 用户信息
        返回:
        Json
        抛出:
        SQLException - e