Skip to content

Commit

Permalink
Merge branch 'hotfix/2.1.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
lcobucci committed Mar 13, 2015
2 parents 2a62dd3 + f31c2ec commit 1e709f2
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
k# JWT
# JWT
[![Gitter](https://img.shields.io/badge/GITTER-JOIN%20CHAT%20%E2%86%92-brightgreen.svg?style=flat-square)](https://gitter.im/lcobucci/jwt?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Total Downloads](https://img.shields.io/packagist/dt/lcobucci/jwt.svg?style=flat-square)](https://packagist.org/packages/lcobucci/jwt) [![Latest Stable Version](https://img.shields.io/packagist/v/lcobucci/jwt.svg?style=flat-square)](https://packagist.org/packages/lcobucci/jwt)

![Branch master](https://img.shields.io/badge/branch-master-brightgreen.svg?style=flat-square)
Expand Down Expand Up @@ -142,4 +142,4 @@ $token = (new Builder())->setIssuer('http://example.com') // Configures the issu
var_dump($token->verify($keychain->getPublicKey('file://{path to your public key}')); // true when the public key was generated by the private one =)
```

**It's important to say that if you're using RSA keys your shouldn't invoke ECDSA signers (and vice-versa), otherwise ```sign()``` and ```verify()``` will raise an exception!**
**It's important to say that if you're using RSA keys you shouldn't invoke ECDSA signers (and vice-versa), otherwise ```sign()``` and ```verify()``` will raise an exception!**
2 changes: 1 addition & 1 deletion src/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public function setId($id, $replicateAsHeader = false)
*
* @return Builder
*/
public function setIssueAt($issuedAt, $replicateAsHeader = false)
public function setIssuedAt($issuedAt, $replicateAsHeader = false)
{
return $this->setRegisteredClaim('iat', (int) $issuedAt, $replicateAsHeader);
}
Expand Down
18 changes: 9 additions & 9 deletions test/BuilderTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,13 +246,13 @@ public function setIdMustKeepAFluentInterface()
* @uses Lcobucci\JWT\Builder::__construct
* @uses Lcobucci\JWT\Builder::set
*
* @covers Lcobucci\JWT\Builder::setIssueAt
* @covers Lcobucci\JWT\Builder::setIssuedAt
* @covers Lcobucci\JWT\Builder::setRegisteredClaim
*/
public function setIssueAtMustChangeTheIatClaim()
public function setIssuedAtMustChangeTheIatClaim()
{
$builder = $this->createBuilder();
$builder->setIssueAt('2');
$builder->setIssuedAt('2');

$this->assertAttributeEquals(['alg' => 'none', 'typ' => 'JWT'], 'header', $builder);
$this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder);
Expand All @@ -264,13 +264,13 @@ public function setIssueAtMustChangeTheIatClaim()
* @uses Lcobucci\JWT\Builder::__construct
* @uses Lcobucci\JWT\Builder::set
*
* @covers Lcobucci\JWT\Builder::setIssueAt
* @covers Lcobucci\JWT\Builder::setIssuedAt
* @covers Lcobucci\JWT\Builder::setRegisteredClaim
*/
public function setIssueAtCanReplicateItemOnHeader()
public function setIssuedAtCanReplicateItemOnHeader()
{
$builder = $this->createBuilder();
$builder->setIssueAt('2', true);
$builder->setIssuedAt('2', true);

$this->assertAttributeEquals(['iat' => $this->defaultClaim], 'claims', $builder);

Expand All @@ -287,14 +287,14 @@ public function setIssueAtCanReplicateItemOnHeader()
* @uses Lcobucci\JWT\Builder::__construct
* @uses Lcobucci\JWT\Builder::set
*
* @covers Lcobucci\JWT\Builder::setIssueAt
* @covers Lcobucci\JWT\Builder::setIssuedAt
* @covers Lcobucci\JWT\Builder::setRegisteredClaim
*/
public function setIssueAtMustKeepAFluentInterface()
public function setIssuedAtMustKeepAFluentInterface()
{
$builder = $this->createBuilder();

$this->assertSame($builder, $builder->setIssueAt('2'));
$this->assertSame($builder, $builder->setIssuedAt('2'));
}

/**
Expand Down

0 comments on commit 1e709f2

Please sign in to comment.