當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript authentication.service.AuthenticationService類代碼示例

本文整理匯總了TypeScript中core/authentication/authentication.service.AuthenticationService的典型用法代碼示例。如果您正苦於以下問題:TypeScript service.AuthenticationService類的具體用法?TypeScript service.AuthenticationService怎麽用?TypeScript service.AuthenticationService使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了service.AuthenticationService類的8個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: constructor

  constructor(private $sce: ISCEService,
              private app: Application,
              private authenticationService: AuthenticationService) {

    const user: string[] = this.authenticationService.getAuthenticatedUser().name.split('@');
    const url = NetflixSettings.tableau.appSourceUrl.replace('${app}', this.app.name).replace('${user}', user[0]);
    this.srcUrl = this.$sce.trustAsResourceUrl(url);
  }
開發者ID:brujoand,項目名稱:deck,代碼行數:8,代碼來源:appTableau.controller.ts

示例2:

    .controller('ScriptStageCtrl', ($scope: IScope, stage: IStage, authenticationService: AuthenticationService) => {
      $scope.stage = stage;
      $scope.stage.failPipeline = ($scope.stage.failPipeline === undefined ? true : $scope.stage.failPipeline);
      $scope.stage.waitForCompletion = ($scope.stage.waitForCompletion === undefined ? true : $scope.stage.waitForCompletion);

      if (!$scope.stage.user) {
        $scope.stage.user = authenticationService.getAuthenticatedUser().name;
      }

      $scope.viewState = {
        loading: false
      };
    });
開發者ID:robfletcher,項目名稱:deck,代碼行數:13,代碼來源:scriptStage.ts

示例3: constructor

  constructor(private $scope: any,
              private $uibModal: IModalService,
              private stage: IIsolatedTestingTargetStage,
              private namingService: NamingService,
              private providerSelectionService: any,
              authenticationService: AuthenticationService,
              private cloudProviderRegistry: CloudProviderRegistry,
              private serverGroupCommandBuilder: any,
              private serverGroupReader: ServerGroupReader,
              private awsServerGroupTransformer: any) {

    const user = authenticationService.getAuthenticatedUser();
    $scope.stage = stage;
    $scope.stage.owner = $scope.stage.owner || (user.authenticated ? user.name : null);

    $scope.stage.username = user.name.includes('@') ? user.name.substring(0, user.name.lastIndexOf('@')) : user.name;
  }
開發者ID:sghill,項目名稱:deck,代碼行數:17,代碼來源:isolatedTestingTargetStage.ts

示例4: triggerPipeline

 public triggerPipeline(applicationName: string, pipelineName: string, body: any = {}): IPromise<string> {
   body.user = this.authenticationService.getAuthenticatedUser().name;
   return this.API.one('pipelines').one(applicationName).one(pipelineName).data(body).post()
     .then((result: ITriggerPipelineResponse) => {
       return result.ref.split('/').pop();
   });
 }
開發者ID:jcwest,項目名稱:deck,代碼行數:7,代碼來源:pipelineConfig.service.ts

示例5: return

      return (exception: Error, cause: string) => {

        $delegate(exception, cause);
        const $http = $injector.get('$http'); // using injector access to avoid a circular dependency
        if (SETTINGS.alert) {

          let message: string = exception.message;
          if (!message) {
            try {
              message = JSON.stringify(exception);
            } catch (e) {
              message = '[No message available - could not convert exception to JSON string]';
            }
          }

          const payload = {
            alertName: 'Spinnaker',
            details: {
              url: location.href,
              user: authenticationService.getAuthenticatedUser().name,
              version: currentVersion.version,
            },
            exception: {
              classes: [exception.name || '[no name on exception]'],
              messages: [message],
              stackTraces: [exception.stack || '[no stacktrace available]'],
              callerClass: 'Spinnaker',
              callerMethod: '[see stack trace]',
            },
            actions: [
              {
                action: 'email',
                suppressTimeSecs: SETTINGS.alert.throttleInSeconds,
                to: SETTINGS.alert.recipients,
                subject: SETTINGS.alert.subject || '[Spinnaker] Error in Deck',
                htmlTemplate: SETTINGS.alert.template || 'spinnaker_deck_error',
                incidentKey: exception.message,
              }
            ],
          };

          $http.post(SETTINGS.alert.url, payload);
        }
      };
開發者ID:brujoand,項目名稱:deck,代碼行數:44,代碼來源:exceptionHandler.ts

示例6: startAdHocPipeline

 public startAdHocPipeline(body: any): IPromise<string> {
   body.user = this.authenticationService.getAuthenticatedUser().name;
   return this.API.one('pipelines').one('start').data(body).post().then((result: ITriggerPipelineResponse) => {
     return result.ref.split('/').pop();
   });
 }
開發者ID:jcwest,項目名稱:deck,代碼行數:6,代碼來源:pipelineConfig.service.ts

示例7: triggerPipeline

 public triggerPipeline(applicationName: string, pipelineName: string, body: any = {}): ng.IPromise<void> {
   body.user = this.authenticationService.getAuthenticatedUser().name;
   return this.API.one('pipelines').one(applicationName).one(pipelineName).data(body).post();
 }
開發者ID:jtk54,項目名稱:deck,代碼行數:4,代碼來源:pipelineConfig.service.ts

示例8: startAdHocPipeline

 public startAdHocPipeline(body: any): ng.IPromise<void> {
   body.user = this.authenticationService.getAuthenticatedUser().name;
   return this.API.one('pipelines').one('start').data(body).post();
 }
開發者ID:jtk54,項目名稱:deck,代碼行數:4,代碼來源:pipelineConfig.service.ts


注:本文中的core/authentication/authentication.service.AuthenticationService類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。