Skip to content

Repository files navigation

Yunbi Chat

Deploy

Rails

# app/helpers/application_helper.rbdefchat_tokenpayload={jti: current_user.id.to_s,iss: current_user.nickname,sub: Digest::MD5.hexdigest(current_user.email)[0...3].upcase,adi: Settings.roles.chatroom.admin.include?(current_user.email)}JWT.encodepayload,'xxx','HS256'end
# app/views/welcome/index.html.erb
<iframeframeborder="0" name="Iframe1" src="https://bcachat.com:4443/?xtoken=<%= chat_token %>" width="100%" height="350"></iframe>

Phoenix

# web/controllers/page_controller.ex{:ok,claims}=JsonWebToken.verify(jwt,%{key: "xxx"})

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages