public class Credentials extends Object
Modifier and Type | Field and Description |
---|---|
String |
accessToken |
String[] |
authorizedScopes |
String |
certificate |
String |
clientId |
Constructor and Description |
---|
Credentials(String clientId,
String accessToken) |
Credentials(String clientId,
String accessToken,
String certificate) |
Modifier and Type | Method and Description |
---|---|
void |
configureHawk() |
Credentials |
createTemporaryCredentials(String[] scopes,
Date start,
Date expiry)
This method is used to generate unnamed temporary credentials.
|
Credentials |
createTemporaryCredentials(String clientId,
String[] scopes,
Date start,
Date expiry)
This method is used to generate named temporary credentials.
|
String |
generateAuthorizationHeader(URI uri,
String method,
String hash) |
static String |
generateTemporaryAccessToken(String accessToken,
String seed) |
Certificate |
getCertificate() |
String |
toString() |
public String[] authorizedScopes
public String accessToken
public String clientId
public String certificate
public void configureHawk()
public Credentials createTemporaryCredentials(String[] scopes, Date start, Date expiry) throws InvalidOptionsException
This method is used to generate unnamed temporary credentials.
Note that the auth service already applies a 5 minute clock skew to the start and expiry times in https://github.com/taskcluster/taskcluster-auth/pull/117 so no clock skew is applied in this method, nor should be applied by the caller.
InvalidOptionsException
public Credentials createTemporaryCredentials(String clientId, String[] scopes, Date start, Date expiry) throws InvalidOptionsException
This method is used to generate named temporary credentials.
Note that the auth service already applies a 5 minute clock skew to the start and expiry times in https://github.com/taskcluster/taskcluster-auth/pull/117 so no clock skew is applied in this method, nor should be applied by the caller.
InvalidOptionsException
public static String generateTemporaryAccessToken(String accessToken, String seed)
public String generateAuthorizationHeader(URI uri, String method, String hash)
public Certificate getCertificate()
Copyright © 2014–2018 Mozilla. All rights reserved.