login
説明
login(
は、ログイン資格情報の入力を求めるプロンプトを表示し、myClient
)myClient
を Open Services for Lifecycle Collaboration (OSLC) サーバーで認証します。
メモ
関数 login
がサービス プロバイダーに対して機能しない場合は、setHttpOptions
と setHttpHeader
を使用して OSLC サービス プロバイダーで oslc.Client
のインスタンスの認証を試してください。関数 login
は一部の OSLC サービス プロバイダーでは機能しないことがあります。
例
要件管理ドメインの OSLC クライアントの作成と構成
この例では、MATLAB® で OSLC クライアントを作成し、クライアントを要件管理ドメインの OSLC サービス プロバイダーに接続するように構成する方法を示します。
OSLC クライアントを作成します。
myClient = oslc.Client;
サービス プロバイダーのユーザーとサーバー URL を設定します。さらに、要件管理ドメインのサービス ルートとカタログ パス、および構成のクエリ パスを設定します。
setUser(myClient,'jdoe'); setServer(myClient,'https://localhost:9443'); setServiceRoot(myClient,'rm'); setCatalogPath(myClient,'/oslc_rm/catalog'); setConfigurationQueryPath(myClient,'gc/oslc-query/configurations'); myClient
クライアントにログインし、プロンプトが表示されたら資格情報を入力します。
login(myClient);
指定したカタログ パスとサービス ルートで使用可能なサービス プロバイダーを取得します。OSLC クライアントを目的のサービス プロバイダーに設定します。
providers = getServiceProviderNames(myClient)
providers = 4×1 cell array {'OSLC Plugin' } {'Model Based Design with OSLC' } {'OSLC4RM' } {'Interactive Testing (Requirements Management)'}
setServiceProvider(myClient,'OSLC Plugin');
該当する場合は、使用可能な構成コンテキストを取得します。OSLC クライアントを目的の構成コンテキストに設定します。
configurations = getConfigurationContextNames(myClient)
configurations = 2×1 cell array {'Initial Development'} {'Initial Baseline' }
setConfigurationContext(myClient,'Initial Development');
クライアントのプロパティを検証します。
myClient
myClient = Client with properties: ServiceProvider: 'OSLC Plugin' ConfigurationContext: 'Initial Development' CatalogUrl: 'https://localhost:9443/rm/oslc_rm/catalog'
入力引数
myClient
— OSLC クライアント
oslc.Client
オブジェクト
OSLC クライアント。oslc.Client
オブジェクトとして指定します。
バージョン履歴
R2021a で導入
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)