PageSourceSearch

https://girder.hub.yt/static/built/plugins/oauth/plugin.min.js

js hub.yt collected 2026-10-01 10:22:30 UTC 13,840 bytes, 1 lines download raw bytes

1var girder_plugin_oauth=function(e){var t={};function i(o){if(t[o])return t[o].exports;var n=t[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,i),n.l=!0,n.exports}return i.m=e,i.c=t,i.i=function(e){return e},i.d=function(e,t,o){i.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:o})},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(9),i(i.s=24)}([function(e,t){e.exports=girder_lib},function(e,t,i){e.exports=i(0)(69)},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=d(i(5)),n=d(i(6)),r=d(i(4)),a=i(7),s=i(18),l=d(i(15));function d(e){return e&&e.__esModule?e:{default:e}}i(17);var u=r.default.extend({events:{"click .g-oauth-button":function(e){var t=(0,o.default)(e.currentTarget).attr("g-provider"),i=n.default.findWhere(this.providers,{id:t});window.location=i.url}},initialize:function(e){var t=this,i=e.redirect||(0,s.splitRoute)(window.location.href).base;this.modeText=e.modeText||"log in",this.providers=null,this.enablePasswordLogin=!n.default.has(e,"enablePasswordLogin")||e.enablePasswordLogin,(0,a.restRequest)({url:"oauth/provider",data:{redirect:i,list:!0}}).done(function(e){t.providers=e,t.render()})},render:function(){if(null===this.providers)return this;var e=[];return n.default.each(this.providers,function(t){var i=this._buttons[t.id];i?(i.providerId=t.id,i.text=t.name,e.push(i)):console.warn("Unsupported OAuth2 provider: "+t.id)},this),e.length&&this.$el.append((0,l.default)({modeText:this.modeText,buttons:e,enablePasswordLogin:this.enablePasswordLogin})),this},_buttons:{google:{icon:"gplus",class:"g-oauth-button-google"},globus:{icon:"globe",class:"g-oauth-button-globus"},github:{icon:"github-circled",class:"g-oauth-button-github"},bitbucket:{icon:"bitbucket",class:"g-oauth-button-bitbucket"},linkedin:{icon:"linkedin",class:"g-oauth-button-linkedin"},box:{icon:"box",class:"g-oauth-button-box"}}});t.default=u},function(e,t,i){e.exports=i(0)(0)},function(e,t,i){e.exports=i(0)(1)},function(e,t,i){e.exports=i(0)(2)},function(e,t,i){e.exports=i(0)(3)},function(e,t,i){e.exports=i(0)(4)},function(e,t,i){e.exports=i(0)(5)},function(e,t,i){"use strict";i(10),i(12),i(13)},function(e,t,i){"use strict";var o=s(i(8)),n=s(i(21)),r=i(1),a=s(i(11));function s(e){return e&&e.__esModule?e:{default:e}}(0,r.exposePluginConfig)("oauth","plugins/oauth/config"),n.default.route("plugins/oauth/config","oauthConfig",function(){o.default.trigger("g:navigateTo",a.default)})},function(e,t,i){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var o=u(i(5)),n=u(i(6)),r=u(i(19)),a=u(i(4)),s=i(7),l=u(i(8)),d=u(i(14));function u(e){return e&&e.__esModule?e:{default:e}}i(16);var c=a.default.extend({events:{"submit .g-oauth-provider-form":function(e){e.preventDefault();var t=(0,o.default)(e.target).attr("provider-id");this.$("#g-oauth-provider-"+t+"-error-message").empty(),this._saveSettings(t,[{key:"oauth."+t+"_client_id",value:this.$("#g-oauth-provider-"+t+"-client-id").val().trim()},{key:"oauth."+t+"_client_secret",value:this.$("#g-oauth-provider-"+t+"-client-secret").val().trim()}])},"change .g-ignore-registration-policy":function(e){(0,s.restRequest)({method:"PUT",url:"system/setting",data:{key:"oauth.ignore_registration_policy",value:(0,o.default)(e.target).is(":checked")}}).done(function(){l.default.trigger("g:alert",{icon:"ok",text:"Setting saved.",type:"success",timeout:3e3})})}},initialize:function(){var e=this;this.providers=[{id:"google",name:"Google",icon:"gplus",hasAuthorizedOrigins:!0,instructions:"Client IDs and secret keys are managed in the Google Developer Console. When creating your client ID there, use the following values:"},{id:"globus",name:"Globus",icon:"globe",hasAuthorizedOrigins:!1,instructions:"Client IDs and secret keys are managed in the Google Developer Console. When creating your client ID there, use the following values:"},{id:"github",name:"GitHub",icon:"github-circled",hasAuthorizedOrigins:!1,instructions:"Client IDs and secret keys are managed in the Applications page of your GitHub account settings. Use the following as the authorization callback URL:"},{id:"bitbucket",name:"Bitbucket",icon:"bitbucket",hasAuthorizedOrigins:!1,instructions:"Client IDs and secret keys are managed in the Applications page of your Bitbucket account settings. Use the following as the authorization callback URL:"},{id:"linkedin",name:"LinkedIn",icon:"linkedin",hasAuthorizedOrigins:!1,instructions:'Client IDs and secret keys are managed at the Applications page of the LinkedIn Developers site. Select the "r_basicprofile" and "r_emailaddress" Default Application Permissions, and use the following as an OAuth 2.0 Authorized Redirect URL:'}
1,{id:"box",name:"Box",icon:"box",hasAuthorizedOrigins:!1,instructions:"Client IDs and secret keys are managed in the Box Developer Services page. When creating your client ID there, use the following as the authorization callback URL:"}],this.providerIds=n.default.pluck(this.providers,"id");var t=["oauth.ignore_registration_policy"];n.default.each(this.providerIds,function(e){t.push("oauth."+e+"_client_id"),t.push("oauth."+e+"_client_secret")},this),(0,s.restRequest)({method:"GET",url:"system/setting",data:{list:JSON.stringify(t)}}).done(function(t){e.settingVals=t,e.render()})},render:function(){var e=window.location.protocol+"//"+window.location.host,t=(0,s.getApiRoot)();if("/"!==t.substring(0,1)&&(t="/"+t),this.$el.html((0,d.default)({origin:e,apiRoot:t,providers:this.providers})),this.breadcrumb||(this.breadcrumb=new r.default({pluginName:"OAuth login",el:this.$(".g-config-breadcrumb-container"),parentView:this}).render()),this.settingVals){n.default.each(this.providerIds,function(e){this.$("#g-oauth-provider-"+e+"-client-id").val(this.settingVals["oauth."+e+"_client_id"]),this.$("#g-oauth-provider-"+e+"-client-secret").val(this.settingVals["oauth."+e+"_client_secret"])},this);var i=this.settingVals["oauth.ignore_registration_policy"];this.$(".g-ignore-registration-policy").attr("checked",i?"checked":null)}return this},_saveSettings:function(e,t){var i=this;t.push({key:"oauth.providers_enabled",value:n.default.filter(this.providerIds,function(e){return!!this.$("#g-oauth-provider-"+e+"-client-id").val()},this)}),(0,s.restRequest)({method:"PUT",url:"system/setting",data:{list:JSON.stringify(t)},error:null}).done(function(){l.default.trigger("g:alert",{icon:"ok",text:"Settings saved.",type:"success",timeout:3e3})}).fail(function(t){i.$("#g-oauth-provider-"+e+"-error-message").text(t.responseJSON.message)})}});t.default=c},function(e,t,i){"use strict";var o=a(i(23)),n=i(1),r=a(i(2));function a(e){return e&&e.__esModule?e:{default:e}}(0,n.wrap)(o.default,"render",function(e){return e.call(this),new r.default({el:this.$(".modal-body"),parentView:this,enablePasswordLogin:this.enablePasswordLogin}).render(),this})},function(e,t,i){"use strict";var o=s(i(20)),n=i(22),r=i(1),a=s(i(2));function s(e){return e&&e.__esModule?e:{default:e}}(0,r.wrap)(o.default,"render",function(e){return e.call(this),(0,n.getCurrentUser)()||new a.default({el:this.$(".modal-body"),parentView:this,modeText:"register automatically"}).render(),this})},function(e,t,i){"use strict";var o=i(3);e.exports=function(e){var t,i="",n=e||{};return function(e,n,r){i+='<div class="g-config-breadcrumb-container"></div><div class="g-reg-policy-config-container"><p>Normally, if the core registration policy is set to closed, OAuth\nusers are also not allowed to be created. If you want to override this\npolicy and allow OAuth users to register even if the core registration\npolicy is closed, check the box below.</p><div class="checkbox"><label><input class="g-ignore-registration-policy" type="checkbox">Ignore closed registration policy</label></div></div><div class="g-oauth-provider-list-title">Configure supported providers below</div><p>Only fill in the information for the OAuth2 providers you wish to enable.</p><div class="panel-group" id="g-oauth-provider-accordion">',function(){var a=r;if("number"==typeof a.length)for(var s=0,l=a.length;s<l;s++){var d=a[s];i=i+'<div class="panel panel-default"><div class="panel-heading" data-toggle="collapse" data-parent="#g-oauth-provider-accordion"'+o.attr("data-target","#g-oauth-provider-"+d.id,!0,!0)+'><div class="panel-title"><a><i'+o.attr("class",o.classes(["icon-"+d.icon],[!0]),!1,!0)+"></i><span>"+o.escape(null==(t=d.name)?"":t)+'</span></a></div></div><div class="panel-collapse collapse"'+o.attr("id","g-oauth-provider-"+d.id,!0,!0)+'><div class="panel-body"><p>'+o.escape(null==(t=d.instructions)?"":t)+"</p>",d.hasAuthorizedOrigins&&(i=i+'<div class="g-oauth-value-container"><b>Authorized javascript origins:</b><span class="g-oauth-value">'+o.escape(null==(t=n)?"":t)+"</span></div>"),i=i+'<div class="g-oauth-value-container"><b>Authorized redirect URI:</b><span class="g-oauth-value">'+o.escape(null==(t=""+n+e+"/oauth/"+d.id+"/callback")?"":t)+'</span></div><form class="g-oauth-provider-form" role="form"'+o.attr("id","g-oauth-provider-"+d.id+"-form",!0,!0)+o.attr("provider-id",d.id,!0,!0)+'><div class="form-group">
1<label class="control-label"'+o.attr("for","g-oauth-provider-"+d.id+"-client-id",!0,!0)+">"+o.escape(null==(t=d.name)?"":t)+' client ID</label><input class="input-sm form-control"'+o.attr("id","g-oauth-provider-"+d.id+"-client-id",!0,!0)+' type="text" placeholder="Client ID"></div><div class="form-group"><label class="control-label"'+o.attr("for","g-oauth-provider-"+d.id+"-client-secret",!0,!0)+">"+o.escape(null==(t=d.name)?"":t)+' client secret</label><input class="input-sm form-control"'+o.attr("id","g-oauth-provider-"+d.id+"-client-secret",!0,!0)+' type="text" placeholder="Client secret"></div><p class="g-validation-failed-message"'+o.attr("id","g-oauth-provider-"+d.id+"-error-message",!0,!0)+'></p><input class="btn btn-sm btn-primary" type="submit" value="Save"'+o.attr("provider-id",d.id,!0,!0)+"></form></div></div></div>"}else for(var s in l=0,a)l++,d=a[s],i=i+'<div class="panel panel-default"><div class="panel-heading" data-toggle="collapse" data-parent="#g-oauth-provider-accordion"'+o.attr("data-target","#g-oauth-provider-"+d.id,!0,!0)+'><div class="panel-title"><a><i'+o.attr("class",o.classes(["icon-"+d.icon],[!0]),!1,!0)+"></i><span>"+o.escape(null==(t=d.name)?"":t)+'</span></a></div></div><div class="panel-collapse collapse"'+o.attr("id","g-oauth-provider-"+d.id,!0,!0)+'><div class="panel-body"><p>'+o.escape(null==(t=d.instructions)?"":t)+"</p>",d.hasAuthorizedOrigins&&(i=i+'<div class="g-oauth-value-container"><b>Authorized javascript origins:</b><span class="g-oauth-value">'+o.escape(null==(t=n)?"":t)+"</span></div>"),i=i+'<div class="g-oauth-value-container"><b>Authorized redirect URI:</b><span class="g-oauth-value">'+o.escape(null==(t=""+n+e+"/oauth/"+d.id+"/callback")?"":t)+'</span></div><form class="g-oauth-provider-form" role="form"'+o.attr("id","g-oauth-provider-"+d.id+"-form",!0,!0)+o.attr("provider-id",d.id,!0,!0)+'><div class="form-group"><label class="control-label"'+o.attr("for","g-oauth-provider-"+d.id+"-client-id",!0,!0)+">"+o.escape(null==(t=d.name)?"":t)+' client ID</label><input class="input-sm form-control"'+o.attr("id","g-oauth-provider-"+d.id+"-client-id",!0,!0)+' type="text" placeholder="Client ID"></div><div class="form-group"><label class="control-label"'+o.attr("for","g-oauth-provider-"+d.id+"-client-secret",!0,!0)+">"+o.escape(null==(t=d.name)?"":t)+' client secret</label><input class="input-sm form-control"'+o.attr("id","g-oauth-provider-"+d.id+"-client-secret",!0,!0)+' type="text" placeholder="Client secret"></div><p class="g-validation-failed-message"'+o.attr("id","g-oauth-provider-"+d.id+"-error-message",!0,!0)+'></p><input class="btn btn-sm btn-primary" type="submit" value="Save"'+o.attr("provider-id",d.id,!0,!0)+"></form></div></div></div>"}.call(this),i+="</div>"}.call(this,"apiRoot"in n?n.apiRoot:"undefined"!=typeof apiRoot?apiRoot:void 0,"origin"in n?n.origin:"undefined"!=typeof origin?origin:void 0,"providers"in n?n.providers:"undefined"!=typeof providers?providers:void 0),i}},function(e,t,i){"use strict";var o=i(3);e.exports=function(e){var t,i="",n=e||{};return function(e,n,r){i+='<div class="g-oauth-container"><div class="g-oauth-section-header"><div class="g-oauth-section-header-text">',n?i=i+"Or "+o.escape(null==(t=r)?"":t)+" with":i+="Log in with",i+="</div></div>",function(){var n=e;if("number"==typeof n.length)for(var r=0,a=n.length;r<a;r++){var s=n[r];i=i+"<div"+(o.attr("class",o.classes(["g-oauth-button",s.class],[!1,!0]),!1,!0)+o.attr("g-provider",s.providerId,!0,!0))+'><div class="g-oauth-button-icon"><i'+o.attr("class",o.classes(["icon-"+s.icon],[!0]),!1,!0)+'></i></div><div class="g-oauth-button-text">'+o.escape(null==(t=s.text||s.providerId)?"":t)+"</div></div>"}else for(var r in a=0,n)a++,s=n[r],i=i+"<div"+(o.attr("class",o.classes(["g-oauth-button",s.class],[!1,!0]),!1,!0)+o.attr("g-provider",s.providerId,!0,!0))+'><div class="g-oauth-button-icon"><i'+o.attr("class",o.classes(["icon-"+s.icon],[!0]),!1,!0)+'></i></div><div class="g-oauth-button-text">'+o.escape(null==(t=s.text||s.providerId)?"":t)+"</div></div>"}.call(this),i+="</div>"}.call(this,"buttons"in n?n.buttons:"undefined"!=typeof buttons?buttons:void 0,"enablePasswordLogin"in n?n.enablePasswordLogin:"undefined"!=typeof enablePasswordLogin?enablePasswordLogin:void 0,"modeText"in n?n.modeText:"undefined"!=typeof modeText?modeText:void 0),i}},function(e,t){},function(e,t){},function(e,t,i){e.exports=i(0)(10)},function(e,t,i){e.exports=i(0)(149)},function(e,t,i){e.exports=i(0)(51)},function(e,t,i){e.exports=i(0)(8)},function(e,t,i){e.exports=i(0)(9)},function(e,t,i){e.exports=i(0)(91)},function(e,t,i){e.exports=i}]);

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.