Skip to content

Commit

Permalink
DX-1096: Add bearer token auth for github.io
Browse files Browse the repository at this point in the history
  • Loading branch information
asbjornu committed Sep 7, 2020
1 parent 6af971a commit e460f2e
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .docker/entrypoint/lib/commands/verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,17 @@ def default_options

def domain_auth_options(auth_token)
{
'github.com' => {
type: :header,
template: 'Bearer %token%',
values: {
token: auth_token
}
'github.com' => bearer_token(auth_token),
'github.io' => bearer_token(auth_token)
}
end

def bearer_token(auth_token)
{
type: :header,
template: 'Bearer %token%',
values: {
token: auth_token
}
}
end
Expand Down
7 changes: 7 additions & 0 deletions .docker/entrypoint/spec/verifier_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,13 @@
values: {
token: 'SECRET'
}
},
'github.io' => {
template: 'Bearer %token%',
type: :header,
values: {
token: 'SECRET'
}
}
}
}
Expand Down

0 comments on commit e460f2e

Please sign in to comment.