Skip to content
This repository was archived by the owner on Feb 25, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion oidc/authorize.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ var AccessToken = require('../models/AccessToken')
var AuthorizationCode = require('../models/AuthorizationCode')
var nowSeconds = require('../lib/time-utils').nowSeconds
var sessionState = require('../oidc/sessionState')
var base64url = require('base64url')

/**
* Authorize
Expand Down Expand Up @@ -78,7 +79,7 @@ function authorize (req, res, next) {
shasum = crypto.createHash('sha256')
shasum.update(response.access_token)
hash = shasum.digest('hex')
atHash = hash.slice(0, hash.length / 2)
atHash = base64url(new Buffer(hash.substring(0, hash.length / 2), 'hex'))
}

var idToken = new IDToken({
Expand Down