PageSourceSearch

https://reg.rmutr.ac.th/regisweb/3980.81b59a839711a2ea.js

js rmutr.ac.th collected 2026-10-01 12:22:05 UTC 2,755 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkvn=self.webpackChunkvn||[]).push([[3980],{73980:(y,m,a)=>{a.r(m),a.d(m,{CallbackModule:()=>b});var f=a(36895),l=a(14213),v=a(6858),u=a(80529),p=a(21816),s=a(94650);const k=[{path:"",component:(()=>{class t{constructor(o,i,d,h){this.http=o,this.Activatedroute=i,this.router=d,this.data=h,this.code="",this.accesstoken=""}ngOnInit(){if(this.Activatedroute.queryParamMap.subscribe(o=>{this.code=o.get("code")}),""!=this.code){const o=new u.WM({"Content-Type":"application/x-www-form-urlencoded"});this.http.post("https://passport.yru.ac.th/oauth/token","grant_type=authorization_code&client_id=47&client_secret=W6JC2hRmW2Z30JLYsBmESo1oziLgZhWu5VFauggM&redirect_uri=https://register.yru.ac.th/registrar/callback&code="+this.code,{headers:o}).subscribe(i=>{if(this.accesstoken=i.access_token,""!=this.accesstoken){const d=new u.WM({"Content-Type":"application/json",Authorization:"Bearer "+this.accesstoken});this.http.get("https://passport.yru.ac.th/api/oauth/userinfo",{headers:d}).subscribe(h=>{this.data.insert("Account/OauthValidate",h).subscribe(c=>{localStorage.setItem("tokenweb",c.token),localStorage.setItem("tokenuser",c.tokenuser),localStorage.setItem("passportlogin","Y");const r=(0,p.Z)(c.token),g=(0,p.Z)(c.tokenuser);localStorage.setItem("usercode",g.usercode),localStorage.setItem("usercode",g.usercode),r.role.some(e=>"student"===e)&&!r.role.some(e=>"instructor"!==e)?(this.router.navigate(["/student"]),localStorage.setItem("role","student")):r.role.some(e=>"instructor"===e)&&r.role.some(e=>"executive"===e)?this.router.navigate(["/changerole"]):r.role.some(e=>"instructor"===e)?(this.router.navigate(["/instructor"]),localStorage.setItem("role","instructor")):r.role.some(e=>"staff"===e)?(this.router.navigate(["/staff"]),localStorage.setItem("role","staff")):r.role.some(e=>"executive"===e)?(this.router.navigate(["/executive"]),localStorage.setItem("role","executive")):r.role.some(e=>"student"===e)&&(this.router.navigate(["/student"]),localStorage.setItem("role","student"))},c=>{})})}})}}}return t.\u0275fac=function(o){return new(o||t)(s.Y36(u.eN),s.Y36(l.gz),s.Y36(l.F0),s.Y36(v.O))},t.\u0275cmp=s.Xpm({type:t,selectors:[["app-callback"]],decls:5,vars:0,consts:[[1,"content-wrapper","container-xxl","p-0"],[1,"content-body"],[1,"row","justify-content-md-center"],[1,"col-md-6"]],template:function(o,i){1&o&&(s.TgZ(0,"div",0)(1,"div",1)(2,"div",2)(3,"div",3),s._uU(4," \xa0 "),s.qZA()()()())}}),t})()}];let C=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[l.Bz.forChild(k),l.Bz]}),t})(),b=(()=>{class t{}return t.\u0275fac=function(o){return new(o||t)},t.\u0275mod=s.oAB({type:t}),t.\u0275inj=s.cJS({imports:[f.ez,C]}),t})()}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.