Examples of Secret


Examples of com.nimbusds.oauth2.sdk.auth.Secret

    assertNull(info.getSecret());
    assertNull(info.getRegistrationURI());
    assertNull(info.getRegistrationAccessToken());

    Date now = new Date(new Date().getTime() / 1000 * 1000);
    Secret secret = new Secret("secret");

    info = new ClientInformation(clientID, now, metadata, secret);

    assertEquals(clientID, info.getID());
    assertEquals(now, info.getIDIssueDate());
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.auth.Secret

    assertNull(info.getSecret());
    assertNull(info.getRegistrationURI());
    assertNull(info.getRegistrationAccessToken());

    Date now = new Date(new Date().getTime() / 1000 * 1000);
    Secret secret = new Secret("secret");
    URI regURI = new URI("https://c2id.com/client-reg/123");
    BearerAccessToken accessToken = new BearerAccessToken("xyz");

    info = new ClientInformation(clientID, now, metadata, secret, regURI, accessToken);

View Full Code Here

Examples of com.nimbusds.oauth2.sdk.auth.Secret

    throws Exception {

    ClientID clientID = new ClientID("123");
    ClientMetadata metadata = new ClientMetadata();
    metadata.setRedirectionURI(new URI("https://example.com/in"));
    Secret secret = new Secret("secret");

    ClientInformation clientInfo = new ClientInformation(clientID, null, metadata, secret);

    assertEquals(clientID, clientInfo.getID());
    assertNull(clientInfo.getIDIssueDate());
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.auth.Secret


  public void testConstructor() {

    String username = "alice";
    Secret password = new Secret("secret");
    ResourceOwnerPasswordCredentialsGrant grant = new ResourceOwnerPasswordCredentialsGrant(username, password);
    assertEquals(GrantType.PASSWORD, grant.getType());
    assertEquals(username, grant.getUsername());
    assertEquals(password, grant.getPassword());
View Full Code Here

Examples of com.nimbusds.oauth2.sdk.auth.Secret

   
    ClientID id = new ClientID(JSONObjectUtils.getString(jsonObject, "client_id"));

    OIDCClientMetadata metadata = OIDCClientMetadata.parse(jsonObject);
   
    Secret clientSecret = null;
   
    if (jsonObject.get("client_secret") != null)
      clientSecret = new Secret(JSONObjectUtils.getString(jsonObject, "client_secret"));


    URI endpointURI;

    try {
View Full Code Here

Examples of hudson.util.Secret

     *
     * @return {@link jenkins.model.Jenkins#ANONYMOUS} if no such credential is found, or if the stored credential is invalid.
     */
    public Authentication get() {
        Jenkins h = Jenkins.getInstance();
        Secret userName = Secret.decrypt(props.getProperty(getPropertyKey()));
        if (userName==null) return Jenkins.ANONYMOUS; // failed to decrypt
        try {
            UserDetails u = h.getSecurityRealm().loadUserByUsername(userName.getPlainText());
            return new UsernamePasswordAuthenticationToken(u.getUsername(), "", u.getAuthorities());
        } catch (AuthenticationException e) {
            return Jenkins.ANONYMOUS;
        } catch (DataAccessException e) {
            return Jenkins.ANONYMOUS;
View Full Code Here

Examples of hudson.util.Secret

                    String form = pm.group();
                    PostMethod post = new PostMethod(
                            new URL(new URL(m.getURI().getURI()),pm.group(1)).toExternalForm());

                    String u = getDescriptor().getUsername();
                    Secret p = getDescriptor().getPassword();
                    if (u==null || p==null) {
                        log.hyperlink(getCredentialPageUrl(),"Oracle now requires Oracle account to download previous versions of JDK. Please specify your Oracle account username/password.\n");
                        throw new AbortException("Unable to install JDK unless a valid Oracle account username/password is provided in the system configuration.");
                    }

                    for (String fragment : form.split("<input")) {
                        String n = extractAttribute(fragment,"name");
                        String v = extractAttribute(fragment,"value");
                        if (n==null || v==null)     continue;
                        if (n.equals("ssousername"))
                            v = u;
                        if (n.equals("password")) {
                            v = p.getPlainText();
                            if (authCount++ > 3) {
                                log.hyperlink(getCredentialPageUrl(),"Your Oracle account doesn't appear valid. Please specify a valid username/password\n");
                                throw new AbortException("Unable to install JDK unless a valid username/password is provided.");
                            }
                        }
View Full Code Here

Examples of io.fathom.cloud.openstack.client.keystore.Secret

        return pem;
    }

    @Override
    public SecretInfo findSecret(String host) {
        Secret secret = secrets.get(host);
        if (secret != null) {
            return new OpenstackSecretInfo(this, secret);
        }

        int firstDot = host.indexOf('.');
View Full Code Here

Examples of io.fathom.cloud.secrets.api.os.model.Secret

    private SecretRecordData getData(SecretService.Secret secret) {
        return ((SecretImpl) secret).getData();
    }

    private Secret toModel(SecretRecordData data) {
        Secret model = new Secret();
        model.id = Long.toString(data.getId());

        model.algorithm = data.getAlgorithm();

        if (data.hasKeySize()) {
View Full Code Here

Examples of io.fathom.cloud.services.SecretService.Secret

        Auth auth = getAuth();
        Project project = auth.getProject();

        List<Secret> secrets = secretService.list(auth, project);

        Secret found = null;
        for (Secret secret : secrets) {
            if (subject.equals(secret.getSecretInfo().subject)) {
                if (found != null) {
                    throw new IllegalStateException("Found multiple keys with subject: " + subject);
                }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.