Skip to content
This repository was archived by the owner on Aug 28, 2019. It is now read-only.

Commit 46cdf03

Browse files
committed
Regenerated library to pick up latest schema changes
1 parent edb8615 commit 46cdf03

File tree

4 files changed

+142
-5
lines changed

4 files changed

+142
-5
lines changed

codegenerator/model/model-data.txt

Lines changed: 75 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4985,20 +4985,92 @@ with TaskCluster, this is probably *not* the service you are looking for.
49854985
Instead, use the federated login support in the tools site.'
49864986
Base URL = 'https://login.taskcluster.net/v1'
49874987
Entry 0 =
4988+
Entry Type = 'function'
4989+
Entry Method = 'post'
4990+
Entry Route = '/persona'
4991+
Entry Args = '[]'
4992+
Entry Query = '[]'
4993+
Entry Name = 'credentialsFromPersonaAssertion'
4994+
Entry Stability = 'experimental'
4995+
Entry Scopes = '[]'
4996+
Entry Input = 'http://schemas.taskcluster.net/login/v1/persona-request.json'
4997+
Entry Output = 'http://schemas.taskcluster.net/login/v1/credentials-response.json'
4998+
Entry Title = 'Get TaskCluster credentials given a Persona assertion'
4999+
Entry Description = 'Given an [assertion](https://developer.mozilla.org/en-US/Persona/Quick_setup), return an appropriate set of temporary credentials.
5000+
5001+
The supplied audience must be on a whitelist of TaskCluster-related
5002+
sites configured in the login service. This is not a general-purpose
5003+
assertion-verification service!'
5004+
Entry 1 =
49885005
Entry Type = 'function'
49895006
Entry Method = 'get'
49905007
Entry Route = '/ping'
49915008
Entry Args = '[]'
49925009
Entry Query = '[]'
49935010
Entry Name = 'ping'
4994-
Entry Stability = 'experimental'
5011+
Entry Stability = 'stable'
49955012
Entry Scopes = '[]'
49965013
Entry Input = ''
49975014
Entry Output = ''
49985015
Entry Title = 'Ping Server'
4999-
Entry Description = 'Documented later...
5016+
Entry Description = 'Respond without doing anything.
5017+
This endpoint is used to check that the service is up.'
50005018

5001-
**Warning** this api end-point is **not stable**.'
5019+
5020+
http://schemas.taskcluster.net/login/v1/credentials-response.json#
5021+
==================================================================
5022+
Additional Properties = 'false'
5023+
Description = 'A response containing temporary credentials.
5024+
'
5025+
ID = 'http://schemas.taskcluster.net/login/v1/credentials-response.json#'
5026+
Properties
5027+
Property 'accessToken' =
5028+
Pattern = '^[a-zA-Z0-9_-]{22,66}$'
5029+
Type = 'string'
5030+
TypeName = 'AccessToken'
5031+
SourceURL = 'http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/accessToken'
5032+
Property 'certificate' =
5033+
Type = 'string'
5034+
TypeName = 'Certificate'
5035+
SourceURL = 'http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/certificate'
5036+
Property 'clientId' =
5037+
Pattern = '^[A-Za-z0-9@/:._-]+$'
5038+
Type = 'string'
5039+
TypeName = 'ClientId'
5040+
SourceURL = 'http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/clientId'
5041+
Required = '[clientId accessToken certificate]'
5042+
Schema = 'http://json-schema.org/draft-04/schema#'
5043+
Title = 'Credentials Response'
5044+
Type = 'object'
5045+
TypeName = 'CredentialsResponse'
5046+
SourceURL = 'http://schemas.taskcluster.net/login/v1/credentials-response.json#'
5047+
5048+
5049+
http://schemas.taskcluster.net/login/v1/persona-request.json#
5050+
=============================================================
5051+
Additional Properties = 'false'
5052+
ID = 'http://schemas.taskcluster.net/login/v1/persona-request.json#'
5053+
Properties
5054+
Property 'assertion' =
5055+
Description = 'The Persona assertion from `navigator.id.get`
5056+
'
5057+
Type = 'string'
5058+
TypeName = 'Assertion'
5059+
SourceURL = 'http://schemas.taskcluster.net/login/v1/persona-request.json#/properties/assertion'
5060+
Property 'audience' =
5061+
Description = 'The audience against which to verify the assertion, in the format
5062+
`https://site.com:443`. This must be from a whitelist of sites
5063+
configured in the login service.
5064+
'
5065+
Type = 'string'
5066+
TypeName = 'Audience'
5067+
SourceURL = 'http://schemas.taskcluster.net/login/v1/persona-request.json#/properties/audience'
5068+
Required = '[assertion audience]'
5069+
Schema = 'http://json-schema.org/draft-04/schema#'
5070+
Title = 'Persona Assertion Request'
5071+
Type = 'object'
5072+
TypeName = 'PersonaAssertionRequest'
5073+
SourceURL = 'http://schemas.taskcluster.net/login/v1/persona-request.json#'
50025074

50035075

50045076
http://references.taskcluster.net/notify/v1/api.json
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
package org.mozilla.taskcluster.client.login;
2+
3+
/**
4+
* A response containing temporary credentials.
5+
*
6+
* See http://schemas.taskcluster.net/login/v1/credentials-response.json#
7+
*/
8+
public class CredentialsResponse {
9+
10+
/**
11+
*
12+
* Syntax: ^[a-zA-Z0-9_-]{22,66}$
13+
*
14+
* See http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/accessToken
15+
*/
16+
public String accessToken;
17+
18+
/**
19+
* See http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/certificate
20+
*/
21+
public String certificate;
22+
23+
/**
24+
*
25+
* Syntax: ^[A-Za-z0-9@/:._-]+$
26+
*
27+
* See http://schemas.taskcluster.net/login/v1/credentials-response.json#/properties/clientId
28+
*/
29+
public String clientId;
30+
}

src/main/java/org/mozilla/taskcluster/client/login/Login.java

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,21 @@ public Login() {
4848
}
4949

5050
/**
51-
* Documented later...
51+
* Given an [assertion](https://developer.mozilla.org/en-US/Persona/Quick_setup), return an appropriate set of temporary credentials.
5252
*
53-
* **Warning** this api end-point is **not stable**.
53+
* The supplied audience must be on a whitelist of TaskCluster-related
54+
* sites configured in the login service. This is not a general-purpose
55+
* assertion-verification service!
56+
*
57+
* @see "[Get TaskCluster credentials given a Persona assertion API Documentation](https://docs.taskcluster.net/reference/core/login/api-docs#credentialsFromPersonaAssertion)"
58+
*/
59+
public CallSummary<PersonaAssertionRequest, CredentialsResponse> credentialsFromPersonaAssertion(PersonaAssertionRequest payload) throws APICallFailure {
60+
return apiCall(payload, "POST", "/persona", CredentialsResponse.class);
61+
}
62+
63+
/**
64+
* Respond without doing anything.
65+
* This endpoint is used to check that the service is up.
5466
*
5567
* @see "[Ping Server API Documentation](https://docs.taskcluster.net/reference/core/login/api-docs#ping)"
5668
*/
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package org.mozilla.taskcluster.client.login;
2+
3+
/**
4+
* See http://schemas.taskcluster.net/login/v1/persona-request.json#
5+
*/
6+
public class PersonaAssertionRequest {
7+
8+
/**
9+
* The Persona assertion from `navigator.id.get`
10+
*
11+
* See http://schemas.taskcluster.net/login/v1/persona-request.json#/properties/assertion
12+
*/
13+
public String assertion;
14+
15+
/**
16+
* The audience against which to verify the assertion, in the format
17+
* `https://site.com:443`. This must be from a whitelist of sites
18+
* configured in the login service.
19+
*
20+
* See http://schemas.taskcluster.net/login/v1/persona-request.json#/properties/audience
21+
*/
22+
public String audience;
23+
}

0 commit comments

Comments
 (0)